Server Fault is a question and answer site for system and network administrators. 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 have an e-mail server powered by Postfix. Aside from traditional e-mail accounts on my server, I want to maintain some accounts whose only role is to forward all incoming mail to differnet address on different mail system.

For example. I own domain and I set account with address on my server. And I want this one account to forward all incoming messages to mailbox in different mail system, in domain that does not belong to me I know, that i can add an entry in in my virtual_alias_maps lookup table.

But I'm worried that to deliver message, Postfix will use original envelope sender address. It's okay if sender is from domain that belongs to me, but otherwise server may classify this message as a spam.

Is there some way, to alter envelope sender on delivery ?

Are smtp_generic_maps ment for this ?

If so, is it okay, that my server sends an e-mail using specific envelope sender, and then something else in message being forwarded ?

How else to deal with such problem ?

share|improve this question

Your concern was valid because the existence of SPF checker. If

  • you forward an email comes from a domain with proper SPF record
  • your IP doesn't listed in their sender SPF record
  • the receiver use SPF record as a factor to identifying spam

then yes, you may have error message SPF fail and the email end up in Spam Folder.

SPF community acknowledge this problem, and they propose Sender Rewriting Scheme (SRS) to workaround this problem. Basically it will rewrite the original sender domain to your domain before forwarding it alias address. For postfix, you can use postsrsd (Postfix Sender Rewriting Scheme daemon) by roehling to implement SRS.

share|improve this answer

As you seem to be well aware, in a situation like yours, setting the return path to something that you control, is definitely important. As to how to do that, it should be as easy as simply reinjecting the email into postfix with the modified return path.

You can look into how to make postfix deliver your email to this command:

| sendmail -f

I am just not sure if you can do that in the virtual_alias_maps table.

share|improve this answer

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.