Can't send or receive email with Postfix (times out)

7,214

The logs are self explanatory for outbound email, in your case email sent to gmail. Your mail server can't connect to Gmail's mail servers on port 25. You can simply verify this by telneting to Gmail's mail server from your mail server -

 telnet gmail-smtp-in.l.google.com. 25
 telnet alt1.gmail-smtp-in.l.google.com. 25
 telnet alt2.gmail-smtp-in.l.google.com. 25

Your dns is working, as your mail server was able to retrieve the MX records for gmail. I would presume Comcast is blocking outbound port 25 connections.

Share:
7,214

Related videos on Youtube

ebol4
Author by

ebol4

Updated on September 18, 2022

Comments

  • ebol4
    ebol4 almost 2 years

    I'm using Postfix and Dovecot on Debian Wheezy for sending and receiving emails. Dovecot seems to work just fine; I can connect, retrieve, move around, delete, etc., emails that already existed in the account (from past cron jobs). Postfix doesn't seem to work correctly though. This is what happens:

    1. Send email from [email protected] using Thunderbird (also tried K9 on Android).
    2. The email seems to make it to the SMTP server okay. The message gets put in my Sent folder in IMAP.
    3. Nothing happens after this. The recipient never receives the email.

    My error log:

    Aug 19 18:12:26 debian postfix/smtp[17822]: 3F920CFC2B4: to=<[MY GMAIL USERNAME]@gmail.com>, relay=none, delay=1282, delays=1219/0.01/63/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smail-smtp-in.l.google.com[74.125.130.26]:25: Connection timed out)
    Aug 19 18:14:56 debian postfix/qmgr[17804]: 3F920CFC2B4: from=<ian@[MYDOMAIN].com>, size=2701, nrcpt=1 (queue active)
    Aug 19 18:14:56 debian postfix/smtp[17836]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1a]:25: Network is unreachable
    Aug 19 18:15:17 debian postfix/smtp[17836]: connect to gmail-smtp-in.l.google.com[173.194.79.26]:25: Connection timed out
    Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt1.gmail-smtp-in.l.google.com[74.125.142.26]:25: Connection timed out
    Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1b]:25: Network is unreachable
    Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1b]:25: Network is unreachable
    

    *edited out my domain and Gmail username.

    I have a Comcast residential line (static IP), and my firewall isn't a problem, the ports are open.

    I also cannot send email to my Postfix server. I've tried sending emails from my Gmail accounts to my domain, and I've also tried sending emails to myself from within my domain; neither works. There are no errors in the logs and no indication that emails were ever received.

    I'm using STARTTLS on both Postfix and Dovecot (certs are self-signed). I used this guide for the most part.

  • ebol4
    ebol4 almost 11 years
    Yep, looks like it; I can't telnet in to those addresses. Going to try this and see if it helps. I wish I knew my Comcast login. Would that also mean that they're blocking inbound port 25 connections as well, since I can't receive email sent from Gmail?
  • Daniel t.
    Daniel t. almost 11 years
    You can test that one too. Either telnet to the Public IP of your email server from outside or use webtools such as subnetonline.com/pages/network-tools/online-smtp-response.ph‌​p . Make sure you open port 25 on your end.
  • ebol4
    ebol4 almost 11 years
    That's times out as well, so it looks like Comcast blocks both inbound and outbound port 25 now. Oh well, thanks for your help.