I wanted to host my own mail server and in order to do so I've installed Postfix 2.7.0 and Dovecot 1.2.9 on Ubuntu Server 10.04. I had fun reading the docs and configuring all these great tools, I am also hosting locally a DNS server and a Web server but right now I am stuck on something regarding Postfix.
One big problem I face right now is that Google SMTP servers reject my mail ONLY WHEN it is being sent remotely. Strange, right?
So if I
telnet localhost 25, issue
AUTH LOGIN(not an open relay of course) then send the mail I get a
status = sent and I actually receive the mail message in my Gmail's account Inbox. Works like a charm.
On the other hand, if I want to send the mail from a remote host, I use
openssl s_client -connect mail.mydomain.com:465
Then I issue
AUTH LOGIN, the login process is successful. So I don't have a problem communicating with my server. I can see what happens in the log files. But when I try to send mail like this, Google replies with:
Our system has detected an unusual rate of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 rate limited.
Why Google accepts my mail if being sent locally but rejects it when I
openssl to my server and send it remotely? It's like Postfix on my server makes Google aware of how the email it forwards got to it.