procmail
[Top] [All Lists]

Re: To and From fields matching

2002-06-24 06:30:32
Thanks - yeah, dumb misteak :)
BTW - I wasn't aware of the ~ issue - thanks.
For anyone looking to acomplish the same task, this now works for me:

:0
* SPAMRULE ?? ^^^^
* From:.*\/[.a-z0-9_]+@
* MATCH ?? ()\/[^(_at_)]+
{
:0
*$ ^To:.*$\MATCH
{ SPAMRULE="Sender and Recipient are the Same" }
}

Where the From address may be foo(_at_)bar(_dot_)com, the match will be on 
"foo", not the
entire address.

Professional Software Engineering wrote:

At 16:56 2002-06-21 -0400, Mark_Saunders wrote:

All messages however, go to a file named (whatever is in the from
field).

(POINTER: *ALL* condition lines start with '*', and the first line that
follows a condition which itself isn't one, is the beginning of the delivery).

If you check your handy-dandy VERBOSE log, it'll point you right to the
glaring syntax problem:

procmail: Assigning "SPAMFILE=~/spam"
procmail: Assigning "SPAMRULE"
procmail: Match on "^^^^"
procmail: Executing "formail,-z,-xFrom:"
procmail: Assigning "LASTFOLDER=SENTBY=service(_at_)paypal(_dot_)com"
procmail: Opening "SENTBY=service(_at_)paypal(_dot_)com"

The above was generated by tossing your recipe into an rcfile all by its
lonesome which is included into a sandbox, then throwing a test message at
it (in this case, some arbitrary message which has been transmuted over
time to test other recipes in the same fashion).

SPAMFILE = ~/spam

FTR, Procmail doesn't comprehend "~" as home.  If you want $HOME, use
it.  The above is likely to cause you untold grief under some circumstances.

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

--
mv $win /dev/null


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