procmail
[Top] [All Lists]

Re: Using an "OR"

2002-06-05 15:46:27
On Wed, Jun 05, 2002 at 02:15:00PM -0700, Professional Software Engineering 
wrote:

Yes, just prefix Body matches with the appropriate Body syntax (B ??).  But 
to get the OR effect for separate condition lines, the easiest (and 
probably "cleanest") way is to use scoring:

:0:
* 9876543210^0 
^From:.*(shopping-values\.com|cybercarsonline(_at_)yahoo\(_dot_)com|gtreet245(_at_)excite\(_dot_)com|marketing(_at_)imfc\(_dot_)com)
* 9876543210^0 ^From: WebProNews
* 9876543210^0 ^Errors-To: morejunkmail
* 9876543210^0 ^Subject:.*(Credit Card|    [0-9][0-9][0-9][0-9][0-9]*$)
* 9876543210^0 ^Subject:.*[Aa][Dd][Vv]: .*$
* 9876543210^0 B ?? ^I send you this file in order to have your advice$
* 9876543210^0 B ?? ^Te mando este archivo para que me des tu punto de 
vista$
${SPAM}

You could break the addresses down to separate scoring lines if it were 
easier for you to visualize.  I'd order the most likely hits first, and 
body matches LAST (even if they're likely), since the body matches are a 
bit more CPU intensive.

Very cool! Thanks! But why "9876543210^0" instead of just "1^0"?

I turned on the log file and verbose logging, but can't find the problem
with the following. Would you have any ideas? :-)

:0:
* 1^0 ^TO(_dot_)*(_at_)spam\(_dot_)mvlan\(_dot_)net
* 1^0 
^From:.*(WebProNews|shopping-values\.com|cybercarsonline(_at_)yahoo\(_dot_)com|\
gtreet245(_at_)excite\(_dot_)com|marketing(_at_)imfc\(_dot_)com)
* 1^0 ^Subject:.*(Credit Card|    [0-9][0-9][0-9][0-9][0-9]*$|\
[Aa][Dd][Vv]: .*$)
* 1^0 ^Errors-To: morejunkmail
* 1^0 B ?? ^(I send you this file in order to have your advice|\
Te mando este archivo para que me des tu punto de vista)$
{
    :0c:
    ${SPAM}

    :0:
    * !^FROM_DAEMON
    * !^X-Loop: null(_at_)spam(_dot_)mvlan(_dot_)net
    {
        :0c:formail.lock
        | expand | sed -e 's/[ ]*$//g' | sed -e 's/^/> /' > return.tmp

        :0:formail.lock
        | ( formail -r -I"Precedence: junk" -A"X-Loop: 
null(_at_)spam(_dot_)mvlan(_dot_)net"; \
            echo "Please note: Your e-mail has been classified as SPAM."; \
            echo "As such, it will be deleted automatically in 7 days"; \
            echo "without being reviewed."; \
            echo "" ; \
            echo "--- begin rejected mail ---" ; \
            cat return.tmp ; \
            echo "--- end rejected mail ---" ; \
            rm -f return.tmp; \
        ) | $SENDMAIL -t -f null(_at_)spam(_dot_)mvlan(_dot_)net
    }
}

-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss(_at_)mvlan(_dot_)net>
Personal Home Page <http://jsmoriss.mvlan.net:8080/>
"With sufficient thrust, pigs fly just fine." -- RFC 1925
_______________________________________________
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>