in my mail server I have a mailbox email@example.com and an alias firstname.lastname@example.org which send all to email@example.com.
Now when I send from firstname.lastname@example.org an email to email@example.com, I receive the mail in firstname.lastname@example.org. Now I would like to rewrite mail header in forwarded messagge with From field set to email@example.com and Reply-To field set to original sender.
My header_check file:
if /^To:.*(firstname.lastname@example.orgemail@example.com)/ /^From:(.+@.+).*$/ PREPEND Reply-To:$1 /^From:(.+@.+).*$/ REPLACE From: firstname.lastname@example.org endif
Where am I wrong? Nothing of this works