procmail
[Top] [All Lists]

Re: procmail/spambuster woes: ${TEST} and && misbehave??

2001-10-20 00:55:16
Mitchell Wand <wand(_at_)ccs(_dot_)neu(_dot_)edu> writes:
I've installed spambuster.  It seems to function OK (ie, it delivers
the mail and doesn't report any malconfiguration problems), except
that it marks all mail as X-SBPass: NoBounce.  
...
:0 f
* ? ${TEST} -f ${NOBOUNCE} && (${FORMAIL} -zxFrom: -zxReply-To: | ${GREP} -i -
f ${NOBOUNCE})
| ${FORMAIL} -A"X-SBPass: NoBounce"
...
Since test -f has decided that the NOBOUNCE file doesn't exist
(twice!), the last recipe ought not to have succeeded (right?).  Yet
it does.

Here's the relevant chunk of the log file (the whole thing is appended
below):
...
procmail: Match on " ${TEST} -f ${NOBOUNCE} && (${FORMAIL} -zxFrom: 
-zxReply-To: | ${GREP} -i -f ${NOBOUNCE})"
...
There are a bunch of recipes like this in Spambuster, and they all
seem to succeed even though they shouldn't.

I thought it might be a problem about the behavior of TEST, but the
same call fails in a simple recipe, yet it seems to succeed inside the
&&.

Alternatively, && may be broken in your shell.  Do you use csh under SCO?
The semantics of its && and || are swapped.  To quote the perl configure
script:

SCO csh still thinks true is false.  Write to SCO today and tell them that next
year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)


You can check for this yourself by running the command
        true || echo "BROKEN!"

If this is the problem (or even if it isn't), you should put
        SHELL=/bin/sh
at the top of the spam bouncer rcfile.


Can anybody give me a clue as to what might be wrong here?  Oddly,
there is at least one other spambuster user at this site, and it works
fine for him.

Does he use a shell other than csh?


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

<Prev in Thread] Current Thread [Next in Thread>