Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am using Debian Squeeze (I believe, the box doesnt 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?

share|improve this question

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.

share|improve this answer
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 – acidzombie24 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 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.