Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to host my own email forwarding for my domain on a small VPS but am having some odd problems getting forwarding to work. I am using exim4 on Ubuntu 12.04.1 LTS and all of my packages are up to date. My setup is such that any email that comes in to a local user ( gets forwarded to I also have SMTP setup so that I can send through my own server from Gmail. The forwarding is set up through my /etc/aliases where I simply have


I am able to send from my VPS to (using mail -s "subject" and I receive the mail in my Gmail inbox. I am able to send from my VPS to (using mail -s "subject" and I receive the mail in my Gmail inbox.

When I try to send from Gmail (or any other address) to I can see the message arrive in the logs and exim attempts to send it out, but the email does not show up in the local mailbox (check with the mail command) and it does not get forwarded to Gmail. The exim logs show this:

2013-02-12 19:27:56 1U5QCZ-0002bt-VA DKIM: s=20120113 c=relaxed/relaxed a=rsa-sha256 [verification succeeded]
2013-02-12 19:27:56 1U5QCZ-0002bt-VA <= [] P=esmtps X=TLS1.0:RSA_ARCFOUR_SHA1:16 S=1736
2013-02-12 19:29:02 1U5QCZ-0002bt-VA [2607:f8b0:4001:c02::1b] Connection timed out
2013-02-12 19:29:05 1U5QCZ-0002bt-VA => <> R=dnslookup T=remote_smtp [] X=TLS1.0:RSA_ARCFOUR_SHA1:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,"
2013-02-12 19:29:05 1U5QCZ-0002bt-VA Completed

Even the Send Mail As verification email to gets forwarded to my Gmail account!

I've checked exim -bp to see if there is anything in the queue but it seems to be empty. I've also done a traceroute on the specified gmail domain and it seems to complete fine. I've seen similar issues posted before, however, all the ones I've read have been all or nothing cases where nothing gets forwarded through, not selectively like this.

Does anyone have any suggestions or recommendations on how I could fix / further debug this problem? Thanks!

share|improve this question
Have you checked your spam filter? It's quite possible that google might be filtering the emails. Lastly do you have SPF records for your domain? – Danie Feb 13 '13 at 5:43
I have checked my spam folder and it seems to be clear, so I don't think that is a a problem. I will try getting an SPF record for my domain and see if that fixes the problem. – nhmood Feb 13 '13 at 15:06

It turns out that this is actually an issue (feature?) on Google's end. If you send email from an address that automatically forwards back to you (eg. -> it will NOT appear in your inbox and only appear in your Sent Mail folder.

This is apparently to prevent multiples of the same message appearing in your inbox (ie. if you are subscribed to a mailing list and send mail to it, you don't want to have your own response in your inbox). They seem to have made this the default on any emails that automatically forward back to keep things consistent.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.