How to include an on the fly autogenerated file in procmailrc

Bart Schaefer barton.schaefer at
Sun Nov 11 03:18:20 CET 2007

On Nov 10, 2007 3:36 PM, Stefano Sabatini
<stefano.sabatini-lala at> wrote:
> Here it is my problem: I see that there is the possibility to include
> a procmailrc inside another. Would be possible to include a file
> autogenerated on the fly, for example using some script, something
> like the:
> source "script args|"
> feature of mutt?

Of course that's just a shorthand for redirecting the output of the
script into a file and then reading the file.  So it's certainly
possible to do that from procmail.  There are any number of ways to do
so; one of them would be:

AUTO_RC = "$HOME/.procmailrc.$$"
* $ ? script args > $AUTO_RC

This uses the "* ?" recipe mechanism to execute the script and test
whether it exited successfully before attempting to read the resulting

Cleaning up the file afterward has been left to the imagination of the reader.

More information about the procmail mailing list