At 20:30 2002-10-14 +0200, H. Thyen wrote:
:0 c
* !^X-Loop
Surely you mean to have a colon after that? And what's with the BLANK LINE
between the flags and the conditions? Lose it.
* !^From: MAILER-DAEMON
From: MAILER-DAEMON isn't the proper way to check for bounces,
BTW. Perhaps you mean:
* ^FROM_DAEMON
or:
* ^FROM_MAILER
(which are distinctly different - FROM_MAILER is a stripped down version of
FROM_DAEMON)
* ? echo $NOTIFY | grep "@"
surely
* NOTIFY ?? @
would be MUCH more efficient?
{
:0
I see an obvious potential for trouble -- your COPY is at the outer recipe
nesting level, and then you add additional conditions WITHIN the braces,
which may not match (though, I see that they're virtually identical, so I'm
not sure why you have conditions within the braces at all), which may cause
the notification to NOT be sent, but the extra copy to carry out to the end
of your .procmailrc. Try moving the 'c' flag to the INNER recipe.
exit
What's this for? I could see this possibly causing issues.
Add VERBOSE=ON above the recipe, (or at least WITHIN the brace, before the
inner recipe), and examing your logs the next time you have an oddity.
Consider running it all within a sandbox (see my .sig), and throwing some
of the messages which failed at it. This would readily expose the reason
for the copies.
Also, don't use 'sendmail', use '$SENDMAIL'. One reason is for
portability, and another is because within a sandbox wrapper, you can
easily redefine $SENDMAIL to execute a script which simply emits the
message and options to a file for examination instead of actually mailing
something (which is a very desireable feature for testing) - ultimatley,
when writing scripts, you want eliminate the need to change anything about
the individual script between testing and actual implementation - when you
have to manually hack the script to move it from testing into use, you
increase the probability of introducing errors.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail