Procmail Recipe - Forward mail and execute script

Cheerz

New Member
Joined
Mar 27, 2019
Messages
1
Reaction score
0
Credits
0
Hi All,


Please can someone advise where I'm wrong as my procmail recipe is not working.

I'm trying to do the following:

1. Execute a script and pass the subject as parameter (this part I have not figured out as yet)
2. forward mail



The recipe that I created is as follows:

:0
* ^From.*[email protected]
{
:0cWhi
| $HOME/script.sh
:0
! [email protected], [email protected]
}

Sending the email executes the script and then only forwards the email to the address [email protected] (skips the [email protected])


If I break down the recipe, then it forwards to both:

:0
* ^From.*[email protected]
! [email protected], [email protected]


What am I doing wrong?

How can I extract the subject to send to the script?


Regards
Hendrik
 


G'day @Cheerz and welcome to linux.org :)

I am moving this Thread to Command LIne, where scripting enquiries are addressed by those who know better.

Good Luck

Chris Turner
wizardfromoz
 

Members online


Top