Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 need a procmail recipe which stores the mail and forwards it to another address.

The following works fine:

! I need to change the From: header in the mails that are being forwarded, and I know it can probably be done with formail but I failed to find any good examples on how to do that and still store the email

EDIT: solved it myself, see the answer below

share|improve this question

I managed to solve it by using this recipe, and I also added a line that changes the From: address for the system where we forward it to

# store mail in default folder and continue after that

# change header
| formail -i "From:"

# forward mail
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.