Postfix selectively blocking countries?

Hi,

I am trying to configure a mail server on Debian Squeeze using Postfix and Dovecot. Dovecot seems to be working fine, I can log in to gmail and send emails to my Linode running Dovecot, then configure my mail client at home for the Linode and retrieve the emails.

The problem I am having is with Postfix. It seems to have loaded just fine, but I cannot configure my mail client for SMTP, nor will Gmail connect via SMTP, though Gmail works fine with the Dovecot server.

When I ssh to the Linode and telnet into the mail server, I can send myself an email, but telnet'ing to the mail server from home doesn't work. I asked someone for help on an IRC channel, and he was able to telnet in to port 25 and send me a message (he does NOT have ssh access), and he lives in Switzerland. This leads me to believe that either Linode or Postfix is blocking the USA (the country I live in) on port 25 because I seriously doubt I use the same ISP as Gmail.

6 Replies

I suspect there are two different problems going on here. Since port 25 is for server-to-server mail transport, many end-user ISPs block outgoing traffic to port 25 in an effort to thwart spamming. So, being unable to reach port 25 on a server from home is not unlikely.

Also, I'm not sure how you're sending mail to Dovecot, as it does not handle mail transport: it just handles IMAP and POP3. Postfix (which just handles SMTP) would be what you're talking to.

What's the right-hand side (i.e. the domain) of the e-mail address you're trying to work with? Does anything show up in Postfix's log when you try to send to it from Gmail?

Considering that Gmail is unable to connect for sending mail – and that the guy in Switzerland, who doesn't have access other than to load the website via web browser, can telnet to my SMTP server to send me a mail -- I was assuming it's not my ISP. I just confirmed that by directing my home email client to the SMTP server running on port 25 on a different server on a different host that also uses Postfix and Dovecot.

The Linode domain I'm trying to use is youdolinux.com, and the MX record reads mail.youdolinux.com. The MX record is what I'm pointing my client to, but I don't include the mail part when sending myself mail from Gmail (e.g. I type myaddress@youdolinux.com and it comes through to the email client at home, which uses mail.youdolinux.com). Since I'm using secure IMAP, setup through Dovecot, I know this works.

Comparing the Postfix main.cf on my Linode to the Postfix main.cf on the machine running on the other host, the only difference (other than pointing to a different domain) is that I'm not using procmail. Since I'm not familiar with email servers, I can try configuring this, but since procmail wasn't pulled in by apt-get when I installed dovecot-imapd and postfix, I was assuming this isn't necessary.

I have no problems connecting to your server on port 25 either, tested from my dedicated server in Norway, and my Linodes in Dallas and London. I didn't test the actual sending of e-mail, since I didn't have an address to test with readily available.

As hoopycat suggested, I would check the mail logs for Postfix to see if there are any connections attempted from Google/Gmail at all, in case something on your system (such as spam prevention) is dropping connections of e-mail from their servers.

I would also check Gmail's troubleshooting guides on the subject for more information:

Messages I send aren't arriving at their destination

My domain can't receive mail from Gmail

And another thing: I noticed that the reverse DNS for you IP address still points to your Linode default (li283-45.members.linode.com). Without being sure, that might also be a contributing factor.

Indeed, working backwards from youdolinux.com (MX? youdolinux.com -> A? mail.youdolinux.com -> 66.228.33.45 -> 66.228.33.45:25), I get to a mail server, and it looks like it knows how to handle youdolinux.com:

$ nc mail.youdolinux.com 25
220 www.youdolinux.com ESMTP Postfix (Debian/GNU)
HELO witte.lan.hoopycat.com
250 www.youdolinux.com
MAIL from: <rtucker@hoopycat.com>250 2.1.0 Ok
RCPT to: <postmaster@youdolinux.com>250 2.1.5 Ok
QUIT
221 2.0.0 Bye</postmaster@youdolinux.com></rtucker@hoopycat.com> 

I'm not sure how to set up a reverse DNS, or what they're used for, but I don't think it's that.

I completely forgot about the setup I hacked together awhile ago for bypassing the port 25 :oops: . My ISP started blocking port 25 back in 2009, so I hacked together a script for my other email that creates an ssh tunnel between port 25 my computer and the machine my other email is hosted on. I don't normally use that particular SMTP setup (though it's there if I want it), I normally use the secure SMTP port, so I completely forgot I had that setup.

I managed to get it working, but now I have an authentication error. I'm googling for it without much luck (it seems kinda confusing for a guy who's not familiar with mail servers), so if I can't fix it, I'll start a new thread.

Not to worry, something like an ISP block for port 25 is easy to forget. :-)

As for setting up reverse DNS, just go to your Linode in the Linode Manager, then go to the "Remote Access" tab and click the "Reverse DNS" link underneath your Linode's public IP. From there, enter the hostnamename (such as "server1.youdolinux.com" or even just "youdolinux.com") you want as the reverse DNS name, as long as that hostname already points to your assigned IP address. Once it's saved, it's only a matter of waiting time until the reverse DNS name appears for everyone (ie. DNS propagation). It's as simple as that.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct