Operating System - Linux
1830233 Members
1783 Online
109999 Solutions
New Discussion

Re: Procmail calling a script

 
Tommy_6
Regular Advisor

Procmail calling a script

Good Morning everyone. I am trying to setup a .procmailrc file where it calls a script.

Basically, all I want the .procmailrc file to do is call a script anytime mail is sent to this account. Does anyone have an example of how I can do this? Thanks in advance.

Tommy
1 REPLY 1
Stuart Browne
Honored Contributor

Re: Procmail calling a script

'man procmailrc':

Recipe action line
The action line can start with the following characters:

| Starts the specified program, possibly in $SHELL if any of the characters $SHELLMETAS are spotted. You can optionally prepend this pipe symbol with variable=, which will cause stdout of the program to be captured in the environment variable (procmail will not terminate processing the rcfile at this point). If you specify just this pipe symbol, without any program, then proc-mail will pipe the mail to stdout.

.. See, man pages are your friend *nod* .. ;)
One long-haired git at your service...