procmail
[Top] [All Lists]

Re: skipping headers in rulesets

2002-03-29 14:17:00

        I'm trying to process messages in a mail spool file of bounced
mail, splitting it out using formail and then running procmail to classify
the bounces to determine how to handle them. The problem is that one of
the rules, which is only supposed to match strings in the body, is
matching the From: header.

        Here is the offending rule: (forgive the formatting)

#
:0Bw
* ^.*mail admin|^.*mail deliv|^.*subsystem|^.*mailer|^.*system
admin|^.*systems
admin|^.*sys admin|^.*mailbox full|^.*cannot create|^.*can't
create|^.*cant crea
te|^.*quota|^.*too many hops|^.*cannot append|^.*can't append|^.*cant
append|^.*
configuration error|^.*config error|^.*looping|^.*size limit|^.*no
storage|^.*no
 space|^.*user unavailable|^.*account unavailable|^.*enough
space|^.*exceeds siz
e|^.*allowed size|^.*dns failure|^.*mailbox is full|^.*mailbox
unavailable|^.*55
4 filtered|^.*Delivery to the following recipients failed
{
  :0HBw
  * X-ATID.*
  | /usr/bin/grep "X-ATID" | /usr/bin/sort -u | sed 's/X-ATID//g' | sed
's/://g' | sed 's/<//g' | sed 's/>//g' | sed 's/ //g' >> $TBOUNCE_DIR.$PID

  :0HBw
  * !X-ATID.*
  /dev/null
}

        This rule is matching on a:

From: Mail Delivery Subsystem ...

        I checked each string manually using egrep, and that was the only
line that it matched, but the only place that it exists is in the headers
of the message.

        Any ideas why this might be happening? I've removed the 'bh' and
the 'W' flag, so now it is only 'Bw'. I'll see if that helps.

        Thanks,

        Ryan

-- 
ryan(_at_)nwgeeks(_dot_)com

HELO... my name is root... you have SIGKILLed my father... prepare to vi!

On Fri, 29 Mar 2002, David W. Tamkin wrote:

Ryan asked,

| Is there any way to effectively disable the 'H' flag for a
| specified rule? For example:
|
| :0BhbwW
|
| These flags still check the headers of the message in that
| particular ruleset. Is there any way to disable this??

Something is amiss.  Using `B' without `H' should restrict searches to the
body.  There's something else going on, Ryan.  What does a verbose logfile
say?  Maybe another recipe is doing something you don't expect it to.

BTW, you should choose `w' or `W' (or neither).  I don't know how procmail
handles being told both, but they do conflict.  And while we're at it, `hb'
is the default, so you don't need that either.









_______________________________________________
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>