doc:appunti:linux:sa:spamassassin
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:spamassassin [2016/02/25 11:49] – [Troubleshooting] niccolo | doc:appunti:linux:sa:spamassassin [2021/07/08 12:19] (current) – [Verifica punteggio] niccolo | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| ===== Custom rules ===== | ===== Custom rules ===== | ||
| - | Di norma non è possibile aggiungere delle regole personalizzate nella **' | + | Di norma non è possibile aggiungere delle regole personalizzate nella **'' |
| In alternativa si può cambiare il punteggio assegnato ad una regole, per fare tutti i necessari esperimenti. Ad esempio la regola **'' | In alternativa si può cambiare il punteggio assegnato ad una regole, per fare tutti i necessari esperimenti. Ad esempio la regola **'' | ||
| Line 94: | Line 94: | ||
| Ecco una semplice regola che controlla la presenza di un determinato header **'' | Ecco una semplice regola che controlla la presenza di un determinato header **'' | ||
| - | < | + | < |
| - | describe | + | header |
| - | score SENDER_GOOGLE_CALENDAR | + | describe |
| + | score LOCAL_SENDER_GOOGLE_CALENDAR | ||
| </ | </ | ||
| Fare attenzione alla stringa dopo il segno **'' | Fare attenzione alla stringa dopo il segno **'' | ||
| + | |||
| + | Un altro esempio per penalizzare certi top level domain particolarmente utilizzati dagli spammer: | ||
| + | |||
| + | < | ||
| + | header | ||
| + | describe | ||
| + | score | ||
| + | </ | ||
| + | |||
| + | Vedere anche il paragrafo **[[spamassassin_private_dnsbl# | ||
| ===== AutoWhitelist ===== | ===== AutoWhitelist ===== | ||
| Line 159: | Line 170: | ||
| ===== Punteggio SPAM ===== | ===== Punteggio SPAM ===== | ||
| + | |||
| + | In una installazione Debian (es. 9 Stretch) i file che definiscono il punteggio SPAM sono in **%%/ | ||
| Una regola che assegna punteggio SPAM può includere 4 punteggio distinti, esempio: | Una regola che assegna punteggio SPAM può includere 4 punteggio distinti, esempio: | ||
| Line 172: | Line 185: | ||
| - Test Bayes abilitati, test network disabilitati | - Test Bayes abilitati, test network disabilitati | ||
| - Test Bayes e network abilitati | - Test Bayes e network abilitati | ||
| + | |||
| + | In generale viene applicato il punteggio del **quarto caso**: tutti i test abilitati. | ||
| Per attivare i test Bayes bisogna includere nel file di configurazione **use_bayes 1**. | Per attivare i test Bayes bisogna includere nel file di configurazione **use_bayes 1**. | ||
| I test network sono disabilitati se il demone **spamd** viene avviato con l' | I test network sono disabilitati se il demone **spamd** viene avviato con l' | ||
| + | |||
| + | ===== Verifica punteggio ===== | ||
| + | |||
| + | Con il seguente script dovrebbe essere possibile verificare il punteggio associato per ciascun test: | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | TESTS=" | ||
| + | if [ -z " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | cat << EOF | ||
| + | |||
| + | === Punteggio SpamAssassin === | ||
| + | |||
| + | * Test Bayes e network disabilitati | ||
| + | * Test Bayes disabilitati, | ||
| + | * Test Bayes abilitati, test network disabilitati | ||
| + | * >>> | ||
| + | |||
| + | EOF | ||
| + | TESTS=" | ||
| + | for TEST in $TESTS; do | ||
| + | find / | ||
| + | SCORE=" | ||
| + | if [ -n " | ||
| + | #echo " | ||
| + | RULE=" | ||
| + | SCORE1=" | ||
| + | SCORE2=" | ||
| + | SCORE3=" | ||
| + | SCORE4=" | ||
| + | printf '%-25s %7.2f %7.2f %7.2f %7.2f\n' | ||
| + | fi | ||
| + | done | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | Ecco un esempio di utilizzo: | ||
| + | |||
| + | < | ||
| + | ./ | ||
| + | |||
| + | === Punteggio SpamAssassin === | ||
| + | |||
| + | * Test Bayes e network disabilitati | ||
| + | * Test Bayes disabilitati, | ||
| + | * Test Bayes abilitati, test network disabilitati | ||
| + | * >>> | ||
| + | |||
| + | HELO_NO_DOMAIN | ||
| + | HTML_MESSAGE | ||
| + | NICE_REPLY_A | ||
| + | RDNS_NONE | ||
| + | SPF_FAIL | ||
| + | </ | ||
| + | ==== Client spamc e IPv6 ==== | ||
| + | |||
| + | Per impostazione predefinita il client **spamc** tenta di connettersi al demone Spamassassin usando il nome **localhost**, | ||
| + | |||
| + | < | ||
| + | spamc[16810]: | ||
| + | </ | ||
| + | |||
| + | Per forzare (system-wide) l' | ||
| + | |||
| + | < | ||
| + | -d 127.0.0.1 | ||
| + | </ | ||
doc/appunti/linux/sa/spamassassin.1456397365.txt.gz · Last modified: by niccolo
