Possible Duplicate:
I can't send email from my server to gmail addresses
I have a VPS server that I host some domains on for myself and clients. A client wants a catch-all on a domain that gets forwarded to an existing Gmail account.
"Simple", I say and go through a quick tutorial on it. For testing I forward @original-domain.com
to [email protected]
(of course these aren't real - but the proper values are correct).
Now to test it. First I wrote an email to [email protected]
using Mutt on the server. Two seconds later an email plops into my [email protected]
inbox (which is actually a Gmail for domains account).
But for a real test I sent an email from [email protected]
to [email protected]
, expecting to just email myself. Nothing came through. I can't find anything in spam or imagine any way that a filter could have caught it. I've looked everywhere for it.
I then decided to check on the server. In /var/log/mail.log there is a beautiful section:
Oct 3 12:59:40 nj postfix/qmgr[26568]: 9AFE448161: from=<[email protected]>, size=1063, nrcpt=1 (queue active)
Oct 3 12:59:41 nj postfix/smtp[26575]: 9AFE448161: to=<[email protected]>, orig_to=<[email protected]>, relay=ASPMX.L.GOOGLE.com[209.85.143.26]:25, delay=1.1, delays=0.29/0.01/0.
11/0.67, dsn=2.0.0, status=sent (250 2.0.0 OK 1317642647 et3si10294675wbb.52)
Oct 3 12:59:41 nj postfix/qmgr[26568]: 9AFE448161: removed
Oct 3 13:00:10 nj postfix/smtpd[26569]: disconnect from mail-yx0-f177.google.com[209.85.213.177]
That looks good. I've had a look at the part where Mutt sent its message, and it's like-for-like.
Because it's connecting, that suggests the firewall is okay (and I explicitly allow p25).
Is the email getting rejected by Google? Wouldn't it change the status of the send message (above) to something other than OK? What can I test next?
It does look like it's being delivered to Google, is it appearing in the spam mailbox? As the recipient is the same as the sender Google may decide that it's a spoofed sender, and being a VPS IP will only add to the score. So try adding your mail server's IP to email whitelist (under "Settings > Email" in GApps admin panel).
Also ensure you have a SPF record setup for the domain which lists your servers IP.
As for the message status, in my experience Google always responds OK unless the recipient is invalid. Filtering probably happens later.
I'll suggest just opening an account at something like hotmail to test from. Who knows what kind of strange behavior you'll run into with this kind of reflection - Google may have any number of reasons that it drops an inbound mail that appears to be from itself somewhere in the chain.