Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Exim4 Forwarding to Gmail

    I've got exim4 on my Debian installation setup to use my gmail account as its smarthost. This is basically working; if I send an email from this machine to, it gets there without any issues. What I'd also like to have happen is local mail sent to my gmail account, so what I did is
    echo > ~/.forward
    This now only seems to be half working. My exim4 log shows this:

    2008-01-06 13:50:46 1JBdOI-0005sm-4Q <= myname@localhost U=myname P=local S=388
    2008-01-06 13:50:48 1JBdOI-0005sm-4Q => <myname@localhost> R=smarthost T=remote_smtp_smarthost [] X=TLS-1.0:RSA_3DES_EDE_CBC_SHA1:24 DN="C=US,ST=California,L=Mountain View,O=Google Inc,"
    2008-01-06 13:50:48 1JBdOI-0005sm-4Q Completed
    It looks like it's forwarding the email but not actually changing the delivery address, and so nothing is showing up in my gmail account. Should my .forward be written differently, or is an exim4 configuration problem? I haven't had much luck finding anything online so far.

  2. #2
    By chance, are you sending the test message from your Gmail account? I just ran into this same issue, but my smart host is my ISP, not gmail. The following scenario always fails:

    Gmail --> Local SMTP --> ISP --> Gmail

    When I tried from a secondary email account, I was able to get the messages through.

    Non-Gmail --> Local SMTP --> ISP --> Gmail

    Also works, when I change the forwarding address, to some place other than Gmail.

    Gmail --> Local SMTP --> ISP --> Non-Gmail

  3. #3
    I'm just using a script which calls sendmail locally. If I remove the .forward file, the email shows up correctly in /var/mail, but when I add the .forward I don't see anything anywhere. I just see the above in my logs which makes it look like it's trying to send the email to gmail.

  4. $spacer_open
  5. #4
    Your exim logs look the same as mine, so I think it is configured correctly. Have you tried setting your foward e-mail address to a non-gmail address? I have gmail accepting my local emails correctly now, but I am using my ISP as the smart host. By setting google as your smart host, you are telling the mail server to send a message to itself, which might or might not work.

    There is definitely some filtering going on at Google's end. Just now I created a new gmail account and tried to link it back to my main account using the forwarding options. So if I send from account1 to account2, I expect it to be forwarded back to account1 ... but it is not. The forwarding only works if the e-mail comes from outside of google's mail server.

  6. #5
    Wow, it looks like gmail just applies some rather sophisticated filtering on the messages. It works properly sent to other domains. However, if I sent it to an account that I have gmail retrieve through POP3 it will show up in that account, but gmail will filtered it out when it retrieves it.

    So basically the short answer is that gmail is picky about acting as a smarthost. I'll have to see if my ISP gives me smarthost support, since that'll probably cause far fewer problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts