How do I specify another procmail script other than .procmailrc?

221 Views Asked by At

I am trying to set up two different environments (development and test) on a single machine where I am using fetchmail/procmail. How would I specify a procmail script other than .procmailrc?

1

There are 1 best solutions below

0
tripleee On

You can optionally specify an alternate rcfile on the command line (or even multiple files).

$ procmail -h 2>&1 | head -n 4
Usage: procmail [-vptoY] [-f fromwhom] [parameter=value | rcfile] ...
   Or: procmail [-toY] [-f fromwhom] [-a argument] ... -d recipient ...
   Or: procmail [-ptY] [-f fromwhom] -m [parameter=value] ... rcfile [arg] ...
   Or: procmail [-toY] [-a argument] ... -z

See the ARGUMENTS section of the manual page for precise details.

With the -m option, the rcfile argument is mandatory. It might be a good idea to use in your scenario, as it disables some defaults which make more sense when running as your default LDA.