I am using Debian Squeeze (I believe, the box doesn't really say) I config exim4 to use Gmail and put root: someuser in /etc/aliases then put my email address (name+box@gmail.com) in .forward.

I receive the email, however the From: is user@mysite.com which is correct, and the To: is root@localhost or anotherUser@localhost with name+box mentioned nowhere. I wanted to write a filter so all emails to name+box@gmail.com will be tagged as something, but my name is not mentioned and it goes directly to the spam folder.

How do I modify this so my name shows up in the email address?


There is a whole chapter in exim docs dedicated to address rewriting. Probably, you should add something like:

headers_rewrite = *@localhost $1@mysite.com t

to one of your transports in exim config, but I may be wrong.

  • I like this answer except i am not exactly trying to rewrite the to sender. I would like some way for my .forward email address to be shown in the email so i can write a filter. I guess i could just write one for anything coming from localhost – user4069 Sep 28 '11 at 11:06
  • you can use procmail to achieve this, or add headers_rewrite to userforward router in exim config – gelraen Sep 28 '11 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy