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@example.com) gets forwarded to firstname.lastname@example.org. 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 email@example.com (using mail -s "subject" firstname.lastname@example.org) and I receive the mail in my Gmail inbox. I am able to send from my VPS to email@example.com (using mail -s "subject" firstname.lastname@example.org) and I receive the mail in my Gmail inbox.
When I try to send from Gmail (or any other address) to email@example.com 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 <= firstname.lastname@example.orgH=mail-qe0-f53.google.com [18.104.22.168] 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@example.com <firstname.lastname@example.org> R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [22.214.171.124] 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@example.com 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!