Skip to contentSkip to conversation

A "subject" rule for procmail

DISCUSSION Marco Calistri 4 participants 8 messages Sep 13, 2003 – Sep 15, 2003

lore
Share & tools
lore
#0 lore raw

Hello I am receiving some spam with the following subject topic:

Sildenafil

so I tried to add the following rule into my .procmailrc file:

:0
* ^Subject:.*Sildenafil
spam/.

but only if the subject is exactly Sildenafil then message is moved to my spam folder,infact if subject is a bit diffferent as for example:

RE:Sildenafil Citrate

then message pass through the inbox without any filtering.

How can I set the rule into procmailrc to block ALL Sildenafil topic subject ?

Thanks

Regards,Marco

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw

You have now learned the futility of subject filters. Perhaps a white list filter would work better. Unfortunately I don't know how to set one of them up in procmail but have one set up and working in pine. As a stopgap measure in procmail, search for something like this, :0 HB
* prescription
spam

-- ----- That effectively searches both the header and body of the message for prescription and tosses those messages into the spam folder. I don't send anything to /dev/null automatically. I have a chance to look at it before taking further action. A white list filter's concept is there are people and lists that don't send you spam; their addresses are put onto a white list. Everyone on that white list goes into your inbox, everyone else goes into spam folder. A further wrinkle on a white list filter is the spam2go folder. See when I search spam, I find some good e-mail in it that won't be picked up by my white list just yet. So I deal with that e-mail accordingly and put the real spam into spam2go and then that empties the spam folder. That way when I next look at spam folder I'm not looking at any old messages since any old spam was already put into spam2go. What happens to the contents of spam2go? Well I enable display of full headers and select all messages when spam2go count gets to 50 messages happens every two days now and forward all messages as a mime digest to [email protected]. Then I delete all messages from spam2go so it only gets new spam for [email protected] to check out. The federal trade commission sometimes takes some action against spam artists and corporations that sponsor spam when legal grounds can be found.GNU Linux a real operating system with a clu
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
In reply to Marco Calistri

Hello, Marco.

As have already been implied, subject filtering isn't the most reliable way of handling spam. If spam is getting on you, then I really recommend installing a bayesian spam filter, especially the one called 'bmf'. The filter learns what is spam and what isn't, by analyzing your mail and listen to your commands. After a while, you'll be totally spam free (which I am now).

A real plus if you happen to use mutt as MUA.

You can find bmf at http://www.sourceforge.net/projects/bmf. Let me know if you're having problem getting it to work, and I'll try to help you.

/Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#3 lore raw

With bmf, does it search a spam folder and learn from what you put into it? The thing is I delete good e-mail after I've finished reading it if there's no further use for it but just because I deleted that e-mail doesn't make it properly spam.

Signature · 8 lines
-----
GNU Linux a real operating system with a clu
ICQ: 204427655
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#4 lore raw
Quoted 4 lines

With bmf, does it search a spam folder and learn from what you put into it? The thing is I delete good e-mail after I've finished reading it if there's no further use for it but just because I deleted that e-mail doesn't make it properly spam.

This is kinda how it works:

When your mail is sent to procmail, procmail pipes it to the bmf program to filter it. Bmf is looking at the headers as well as the message, and compares it with keywords given in a database. If the mail is spam, a new header 'X-Spam-Status' is set to 'Yes', and then the mail is returned to procmail. Now you can make procmail check the X-Spam-Status, and if spam it can either put the mail in a specific spam mailbox (recommended), or to /dev/null.

If bmf misses a spam mail, you can mark the mail as spam which updates the badlist-database. (This is very easy to do with eg. mutt, where you can bind for instance F12 to do this). Similarly, if bmf happen to filter a mail which isn't spam, you can remove it from the database (in eg. mutt you can do this with for instance F11).

If you just delete a mail, it will not be marked as spam.

If there's something you don't understand, please let me know. I'm in a little hurry now - I'm supposed to cook potatoes. ;-)

Hope this helps!
/Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#6 lore raw

Re: (F)A "subject" rule for procmail

Quoted 10 lines · On 14-Sep-2003 Steven wrote:
Quoted 2 lines

How can I set the rule into procmailrc to block ALL Sildenafil topic subject ?

Try:

:0
* ^Subject:.*Sildenafil.*
spam/.

Steven Smith,
[email protected].

With this I want to reply both to you,to Peter Edstrom and to dashielljt. Well first of all many thanks to all of you for interesting answers,however I think I solved a lot of problems by upgrading my SpamAssassin from 2.20 to 2.55 which includes bayesan filter and a DNS-RBL check against possible spam sources. I am testing it at present and I cannot yet say "it works perfectly" but at least I can affirm that it works much better respect the older version. I'd like to read and learn more about the RBL feature and run some tests on this to see if it really works.

Many thanks again and best Regards.

Marco

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#7 lore raw

Re: (F)A "subject" rule for procmail

Quoted 9 lines

With this I want to reply both to you,to Peter Edstrom and to dashielljt. Well first of all many thanks to all of you for interesting answers,however I think I solved a lot of problems by upgrading my SpamAssassin from 2.20 to 2.55 which includes bayesan filter and a DNS-RBL check against possible spam sources. I am testing it at present and I cannot yet say "it works perfectly" but at least I can affirm that it works much better respect the older version. I'd like to read and learn more about the RBL feature and run some tests on this to see if it really works.

Quoted 3 lines

Many thanks again and best Regards.

Marco

In case you want to learn more about spam in general, there are great articles on the subject at www.paulgraham.com. "A Plan For Spam"
(http://www.paulgraham.com/spam.html) covers the Bayesian approach. For information on blacklist, including RBL, you can read the "Filters vs. Blacklists" article (http://www.paulgraham.com/falsepositives.html).
There are also lots of interesting links at the bottom of these pages - time is the only thing that stops you for learning all there is to know. :-)

Just FYI, I've heard many people having problem with SpamAssassin but are more than satisfied with bmf. Bmf is more lightweight than SA and known for being easy to configure and so. But the choice if yours, and I won't propagate for bmf... (ehum..) :-)

Happy spam-hunting!

Best regards,
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs