Question

can not send any email from postfix

Posted September 16, 2015 47.9k views
Ubuntu Email DigitalOcean

Someone can help me? I have no idea why i not able to send any email, only receive.

i am using ubuntu servere with postfix and mail tool

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

To help you in any way, you need to give some information. You can’t ask; “My potatoe doesn’t fit, what to do?”
Check logs, post your configs, check if you get any returns, check your ports, etc.

  • sorry buddy,

    from postfix:
    Sep 6 06:47:49 gmf-tech postfix/smtp[7867]: connect to alt2.gmail-smtp-in.l.google.com[74.125.24.26]:25: Connection timed out
    Sep 6 06:47:49 gmf-tech postfix/smtp[7867]: 347CF124152: to=freitasmgustavo@gmail.com, relay=none, delay=288108, delays=288018/0.01/90/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.24.26]:25: Connection timed out)
    Sep 6 06:47:49 gmf-tech postfix/smtp[7865]: DC0EC124151: to=freitasmgustavo@gmail.com, relay=none, delay=288110, delays=288019/0.01/90/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out)
    Sep 6 06:51:19 gmf-tech postfix/qmgr[1064]: CAF4D124139: from=gustavo@gmf-tech.com, size=380, nrcpt=1 (queue active)
    Sep 6 06:51:19 gmf-tech postfix/qmgr[1064]: C9ABB12413F: from=gustavo@gmf-tech.com, size=380, nrcpt=1 (queue active)
    Sep 6 06:51:19 gmf-tech postfix/error[7991]: CAF4D124139: to=freitasmgustavo@gmail.com, relay=none, delay=292382, delays=292382/0.01/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out)
    Sep 6 06:51:19 gmf-tech postfix/error[7992]: C9ABB12413F: to=freitasmgustavo@gmail.com, relay=none, delay=292379, delays=292379/0.01/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[74.125.24.27]:25: Connection timed out)
    Sep 6 06:56:19 gmf-tech postfix/qmgr[1064]: DAA8B124129: from=gustavo@gmfinfo, size=325, nrcpt=1 (queue active)
    Sep 6 06:56:19 gmf-tech postfix/qmgr[1064]: D04EA12413D: from=gustavo@gmf-tech.com, size=380, nrcpt=1 (queue active)
    Sep 6 06:56:19 gmf-tech postfix/qmgr[1064]: 5843612413E: from=gustavo@gmf-tech.com, size=380, nrcpt=1 (queue active)
    Sep 6 06:56:19 gmf-tech postfix/qmgr[1064]: 607F4124131: from=gustavo@gmfinfo, size=336, nrcpt=1 (queue active)
    Sep 6 06:56:19 gmf-tech postfix/qmgr[1064]: 7CA74124130: from=gustavo@gmfinfo, size=334, nrcpt=1 (queue active)
    Sep 6 06:56:19 gmf-tech postfix/smtp[8001]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c04::1a]:25: Network is unreachable
    Sep 6 06:56:19 gmf-tech postfix/smtp[8002]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c04::1a]:25: Network is unreachable
    Sep 6 06:56:49 gmf-tech postfix/smtp[8003]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out
    Sep 6 06:56:49 gmf-tech postfix/smtp[8000]: connect to gmail-smtp-in.l.google.com[64.233.171.26]:25: Connection timed out
    Sep 6 06:56:49 gmf-tech postfix/smtp[8002]: connect to gmail-smtp-in.l.google.com[74.125.29.27]:25: Connection timed out
    Sep 6 06:56:49 gmf-tech postfix/smtp[8001]: connect to gmail-smtp-in.l.google.com[64.233.171.26]:25: Connection timed out
    Sep 6 06:56:49 gmf-tech postfix/smtp[8000]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c04::1a]:25: Network is unreachable
    Sep 6 06:56:49 gmf-tech postfix/smtp[8000]: connect to alt1.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1b]:25: Network is unreachable
    Sep 6 06:56:49 gmf-tech postfix/smtp[8004]: connect to gmail-smtp-in.l.google.com[74.125.29.27]:25: Connection timed out
    Sep 6 06:56:49 gmf-tech postfix/smtp[8004]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c04::1a]:25: Network is unreachable
    Sep 6 06:57:19 gmf-tech postfix/smtp[8003]: connect to mx2.hotmail.com[65.55.92.184]:25: Connection timed out

    sendmail:

    ctladdr=gustavo@gmf-tech.com (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=60146, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
    ctladdr=gustavo@gmf-tech.com (1000/1000), delay=03:07:50, xdelay=00:10: 36, mailer=esmtp, pri=930284, relay=alt4.gmail-smtp-in.l.google.com. [173.194.65 .27], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.g oogle.com.

    i have uninstall postfix and install sendmail, got the same error connection refused.

    I followed step by step this procedure https://www.digitalocean.com/community/tutorials/how-to-install-and-setup-postfix-on-ubuntu-14-04, without success…

    Can you help me?

    Regards

    Gustavo

    • No problem, but just always give information and details when you have a problem (easier to answer).

      A common cause is because of wrong IPv6 settings. You can either use IPv4, or correct your IPv6 settings. To use IPv4, edit the Postfix configuration file:

      nano /etc/postfix/main.cf
      

      and change inet_protocols = all to inet_protocols = ipv4 and restart or reload Postfix: /etc/init.d/postfix reload . Also flush the Postfix queue:

      postfix -f
      

      You can also solve the problem by setting up IPv6

      nano /etc/network/interfaces
      

      For example a IPv6 config:

      iface eth0 inet6 static
      address 2a00:d880:0:10::xxxx:xxxx
      netmask 64
      gateway 2a00:d880:0:10::1
      up ip -6 addr add 2a00:d880:0:10::xxxx:xxxx/64 dev eth0
      up ip -6 addr add 2a00:d880:0:10::xxxx:xxxx/64 dev eth0
      up ip -6 addr add 2a00:d880:0:10::xxxx:xxxx/64 dev eth0
      up ip -6 addr add 2a00:d880:0:10::xxxx:xxxx/64 dev eth0
      

      Hope I give you enough information with this and you get it fixing, if not you can just ask me

I still have errors after following the answer

The log is

Apr 23 05:10:52 atlantic postfix/error[30337]: 345C541BDC: to=xxx@xxx.com, relay=none, delay=433026, delays=432875/150/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to aspmx3.googlemail.com[209.85.145.26]:25: Connection timed out)
Apr 23 05:10:52 atlantic postfix/qmgr[30268]: 345C541BDC: from=xxx@xxx.com, status=expired, returned to sender
Apr 23 05:10:52 atlantic postfix/cleanup[30338]: BE6C041389: message-id=20180423091052.BE6C041389@atlantic.localdomain
Apr 23 05:10:52 atlantic postfix/qmgr[30268]: BE6C041389: from=<>, size=5228, nrcpt=1 (queue active)
Apr 23 05:10:52 atlantic postfix/bounce[30332]: 345C541BDC: sender non-delivery notification: BE6C041389
Apr 23 05:10:52 atlantic postfix/qmgr[30268]: 345C541BDC: removed
Apr 23 05:10:52 atlantic postfix/error[30335]: BE6C041389: to=xxx@xxx.com, relay=none, delay=0.02, delays=0.02/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to aspmx3.googlemail.com[209.85.145.26]:25: Connection timed out)

Submit an Answer