1

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 ([email protected]) gets forwarded to [email protected]. 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

user:        [email protected]

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

When I try to send from Gmail (or any other address) to [email protected] 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: d=gmail.com s=20120113 c=relaxed/relaxed a=rsa-sha256 [verification succeeded]
2013-02-12 19:27:56 1U5QCZ-0002bt-VA <= [email protected]=mail-qe0-f53.google.com [209.85.128.53] P=esmtps X=TLS1.0:RSA_ARCFOUR_SHA1:16 S=1736 id=CABfo9zkf+wF3TcniU4VjcCTLDnR2NtY2JsFa2YQrMJqmWYKnHw@mail.gmail.com
2013-02-12 19:29:02 1U5QCZ-0002bt-VA gmail-smtp-in.l.google.com [2607:f8b0:4001:c02::1b] Connection timed out
2013-02-12 19:29:05 1U5QCZ-0002bt-VA => [email protected] <[email protected]> R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [74.125.142.27] X=TLS1.0:RSA_ARCFOUR_SHA1:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com"
2013-02-12 19:29:05 1U5QCZ-0002bt-VA Completed

Even the Send Mail As verification email to [email protected] 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!

2
  • 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, 2013 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, 2013 at 15:06

1 Answer 1

3

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. [email protected] -> [email protected]) 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.

Reference: http://productforums.google.com/d/msg/gmail/npFUvcOUVPo/4ViZhQNdxfIJ

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .