8/13/2023 0 Comments Spamassassin ruleThis is a big assumption, so I do not run it automatically, but have to remember to run it manualy every once in a while. The last line assumes that all mail in the default inbox is non-spam. Sa-learn -ham $HOME/Maildir/cur/ > $HOME/log/spam.log Sa-learn -ham $HOME/Maildir/.Spam.falsepositives/cur/ > $HOME/log/spam.log Sa-learn -spam $HOME/Maildir/.Spam.falsenegatives/cur/ > $HOME/log/spam.log Sa-learn -spam $HOME/Maildir/.Spam.negatives/cur/ > $HOME/log/spam.log PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/home/freek/bin Spam/falsepositives I put here non-spam mails that were accidentilly marked as spam. Spam/falsenegatives I put here spam mail that slipped through. I run a cron job to extract the confirmed spam from the report and store it in here. Spam/negatives The confirmed mail is often stored as an attachment to another mail with the spamassassin report. Spam/confirmed After confirming something is spam, I put it in this box. I will have to check these manually (if it is sure, it simply deletes them). Spam/incoming SpamAssassin will store mail which it suspect is spam, but is not 100% sure. When a new mail arrives, it looks at the word usages, and based on that gives a propability score wether the mail is spam or not. It may learn that a spam mail often contains words like viagra, while ham mails contains your full name. You do so by giving it a large sample set (at least 100 mails), which it examins for word usage. The first step is to learn Spamassassin the difference between spam and non-spam ("ham") mails. SpamAssassin uses Bayesian filtering of email to stop spam. SpamAssassin is technique to block spam, based on multiple rules. 4.3 Verify falsepositives and false negatives.> 2.There is any way to preform specific rule for specific condition like : > 1.where to put it so it can be merge to the other rule in the system > I already been there, but thank you anyway. In the example you give, there's nothing to distinguish between the two rules, so I can't tell what you're trying to accomplish.Īre you handling mail for multiple domains? If you're only accepting mail for "," then you can omit the To: part of the rule and just key on the From. Are you looking to create multiple conditions that must be met? You can use the "meta" directive for that. I'm not sure what you are asking for though. Usually that's done only to adjust the scores given to those pre-existing rules. Items in the first directory usually expand the ruleset, though you can override existing rules there as well. The SA-supplied rules are in /usr/share/spamassassin. Usually the local rules go in /etc/mail/spamassasin. Subject: Re: Adding custom rules - spamassassin ![]() Network/email Administrator, CBJ MIS Dept. Much less granular but very effective when you just want to stomp on everything from a particular user or domain.īTW, on some systems, the default spamassassin rulesets land in /var/lib/spamassassin, not /usr/share/spamassassin, depending on which distro you're using. Using MailScanner white/black lists allow you to accept or block at the username and/or domain name level. ![]() ![]() Using a spamassassin rule will let you target very specific patterns which is good if a bunch of spam messages are identical but being sent from multiple different domains, or from an email address from which you don't want to block everything. Look in the rules directory for examples. The other option is to use the whitelist or blacklist settings in nf: ![]() Then, create the rules that you need within that file. cf will be processed automatically by spamassassin. cf (MySpamRules.cf, for example) in /etc/mail/spamassassin. To create custom spamassassin rules, create a text file ending in. MailScanner will then act on them via the spam actions and spam score settings in nf (or your customizations in the conf.d directory). Both are fairly easy.Īs Peter mentions, you can create a rule in spamassassin which will add or subtract X points to messages that match. You have a couple options for black/white listing. Next message (by thread): Whitelisting code.Previous message (by thread): Adding custom rules - spamassassin.Adding custom rules - spamassassin Kevin Miller kevin.miller at
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |