procmail
[Top] [All Lists]

Re: Why this filter didn't work.....

2002-02-20 13:46:12
At 13:49 2002-02-20 -0600, SMORRIS(_at_)UP(_dot_)COM did say:

:0 B
* to opt out
/dev/null

However, an email with this in the body got through:

This email was sent to <big>smorris(_at_)up(_dot_)com</big> so you must use 
that email
address to opt out.  (Notice the "opt out" at the end of that sentence.)

What do your VERBOSE logs say?

I verified that the above recipe was in my procmailrc file (I thought maybe
I had it as "opt-out" instead of "opt out") but found that I did have it as
I wanted it.  I then forwarded the email to myself, and the filter worked,
deleting the email.  I didn't make any modifications to the recipe before
forwarding it to myself, and the recipe worked.

By forwarding it to yourself, you may have bypassed an earlier rule in your rc file. Depending on your email client, IT may have even altered the message body in the process of forwarding the message.

There was some html code in the original email, but in viewing the source,
I found that "opt out" was indeed there, unaffected by any html.

"to opt out" is what you're matching for. Be sure that WHOLE string is continuous. If YOU have a problem, it really helps if you doublecheck that the EXACT terms you quote (as well as the EXACT recipies you post) match what you're dealing with.

Does anyone know why the recipe failed to catch it from the original sender, but then it worked when I simply forwarded it to myself?

By forwarding it to yourself, you may have bypassed an earlier rule in your rc file. You're _MUCH_ better off re-running procmail with the saved message file (as per "sandbox" testing), rather than re-introducing the message to your MTA, since the latter can significantly change the characteristics of the message.

You should try enabling VERBOSE logging and monitoring the logs for several days if you're seeing misses like this.

:0 B
* softwareforyou
/dev/null

:0 B
* visosite
/dev/null

:0 B
* 9876543210^0 to opt out
* 9876543210^0 visosite
* 9876543210^0 softwareforyou
* 9876543210^0 as seen on national tv
spam

If you're going to match multiple things in the body, any of which flag it as spam, combining them into one recipe would streamline your processing. Before asking "what are all those numbers for" please read 'man procmailsc'.

All of the rules you posted which were based on headers are missing the BOL (Beginning Of Line) anchor, ^ :

:0
* From:(_dot_)*(_at_)sexyfun\(_dot_)net
/dev/null

Should be
* ^From:(_dot_)*(_at_)sexyfun\(_dot_)net

(etc).

I have a concern that I may be doing something wrong,

First thing is that you shouldn't simply be dumping things to /dev/null unless you're ABSOLUTELY POSITIVE of what you're doing. If you have ANY concerns, that should be the first thing you change. It seems weird that you'd filing _some_ things to a spam mailbox, and others to /dev/null.

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

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