4

I'm sending email using Postfix on my Debian server, which is working fine.

Now I want to receive email by forwarding all incoming email to my email address (which is not on this server). I got this working using the following config:

/etc/postfix/virtual:

/.+@.+/ [email protected]

/etc/postfix/main.cf:

virtual_maps = regexp:/etc/postfix/virtual

This forwards all incoming email to my email address, which is working. However, this forwards email using the From header of the original email, which I don't want because it may get my IP address on a blacklist.

How can I rewrite the From header of all forwarded emails to something like [email protected]?

I tried using a regex to rewrite all domains that are not mine to [email protected], but since I'm not so good at regex I can't get it working. I also tried setting remote_header_rewrite_domain to my.domain but that doesn't change anything.

If possible, I would like to just set the Sender header for all forwarded emails.

1 Answer 1

2

Rewriting the From header field would not help with protecting your ip address from getting blacklisted when the receiver of that mail marks it as spam as your ip address will still be the one that transmitted that e-mail, but might make the receiver realize it is being forwarded.

You can use postfix header_checks feature to rewrite the From header. 1

Forwarding also breaks SPF and this article might give you another perspective into the same problem

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .