procmail
[Top] [All Lists]

Re: Sender filter almost complete, any comments?

2006-10-04 14:11:44
At 21:06 2006-10-04 +0100, Steve A wrote:
Well, it's almost complete now.  It works but I think I might have to
tweak it.

IT WORKS?  Put down the bong and back away slowly...

[snip]

1.
Is it arranged correctly?

If you were to continue to do a variable assignment, that _CLEAN_FROM_USER 
bit (what's with the leading underscore anyway, which isn't on the 
expansion on the following line?) should be above the inner flags line.

Next, why are you going through the effort of extracting it to a variable 
just so that you can echo it into a (curiously formed) grep?  Eliminate the 
variable assignment and echo and do it all at once.  The following is the 
entirety of your recipe, sans variable setup:

:0:
* ^X-Original-To:["$WS"]*\/.*
* $! ? grep -i -x $MATCH $RCPT_WHITELIST
* $? formail -IReply-To: -rtzxTo: | sed -e "s/\([^(_at_)]*\)\(@.*\)$/\1/" |\
         grep -i -x -f $FROM_BLACKLIST
$FROMJUNK

2.
It complains:
Couldn't determine implicit lockfile from "formail -IReply-To: -rtzxTo:
| awk -F@ '{print $1}'"

Because, as formatted, that assignment line is the DELIVERY, not a 
condition.  In turn, your conditions are not being evaluated.

Should I be specifying a manual lockfile here, or is it because my
layout isn't optimal?

Your layout is hosed.

         :flags
         * conditions
         delivery

Your variable assignment doesn't follow that syntax.

---
  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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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