procmail
[Top] [All Lists]

Re: is there a way to evade /etc/procmailrc ?

2002-10-03 21:08:34
LuKreme followed up,

| Woah.  The .forward supersedes /etc/procmailrc ?

The .forward supersedes the LDA entirely.  If you specify one or more rcfiles
on procmail's command line, procmail skips /etc/procmailrc.  Note that if you
use procmail's -m option, you must specify exactly one rcfile on the command
line, so -m and /etc/procmailrc never go together.

| How about checking for a .nospamfilter file?  is there a if (-r $FILE)
| sort of command in procmail that could do somthing like:

| $NOSPAM = $HOME/.nospamfilter

That line is unnecessary ... and improperly written if you do want to use it.
Think sh, not perl:

 NOSPAM=$HOME/.nospamfilter

| :0
| <something to check if $NOSPAM exist>
| {
|    INCLUDERC = $SPAMRC
| }

That can work.  But instead of putting all the spamassassin call into another
rcfile and making procmail do another open and use another file descriptor,
you could just put the spamassassin call between the braces, or if it's only
one line, use it as the action:

 :0hbfw
 * ! ? test -f $HOME/.nospamfilter
 | spamassassin -opts args

[Sorry, I don't use spamassassin, so I don't know what its command line should
look like.]



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail