How to setup procmail to send all incoming mail to two, three or more scripts and leave a copy in mailbox?
Question
How can I force .procmailrc for each incoming email:
- leave this email in my mailbox as if nothing happened.
- Give mail to script1.sh through stdin
- Give mail to script2.sh through stdin
- Give mail to script3.sh through stdin
- Give mail to script4.sh through stdin and so on
how can I do it?
Solution
Just use a bunch of non-delivering pipe actions
:0 c
|script1.sh
:0 c
|script2.sh
:0 c
|script3.sh
etc. When it falls through all the recipes without having delivered it will deliver to the system standard inbox.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow