Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | MX_IMPLICIT { |
| 2 | expression = "MX_GOOD & MX_MISSING"; |
| 3 | score = -0.01; |
| 4 | } |
| 5 | VIRUS_FOUND { |
| 6 | expression = "CLAM_VIRUS & !MAILCOW_WHITE"; |
| 7 | score = 2000.0; |
| 8 | } |
| 9 | # Bad policy from free mail providers |
| 10 | FREEMAIL_POLICY_FAILURE { |
| 11 | expression = "-g+:policies & !DMARC_POLICY_ALLOW & !MAILLIST & ( FREEMAIL_ENVFROM | FREEMAIL_FROM ) & !WHITELISTED_FWD_HOST"; |
| 12 | score = 16.0; |
| 13 | } |
| 14 | # Bad policy from non-whitelisted senders |
| 15 | # Remove SOGO_CONTACT symbol for fwd hosts and senders with broken policy |
| 16 | SOGO_CONTACT_EXCLUDE { |
| 17 | expression = "(-WHITELISTED_FWD_HOST | -g+:policies) & ^SOGO_CONTACT & !DMARC_POLICY_ALLOW"; |
| 18 | } |
| 19 | # Spoofed header from and broken policy (excluding sieve host, rspamd host, whitelisted senders, authenticated senders and forward hosts) |
| 20 | SPOOFED_UNAUTH { |
| 21 | expression = "!MAILCOW_AUTH & !MAILCOW_WHITE & !RSPAMD_HOST & !SIEVE_HOST & MAILCOW_DOMAIN_HEADER_FROM & !WHITELISTED_FWD_HOST & -g+:policies"; |
| 22 | score = 50.0; |
| 23 | } |
| 24 | # Only apply to inbound unauthed and not whitelisted |
| 25 | OLEFY_MACRO { |
| 26 | expression = "!MAILCOW_AUTH & !MAILCOW_WHITE & OLETOOLS"; |
| 27 | score = 20.0; |
| 28 | policy = "remove_weight"; |
| 29 | } |
| 30 | # Applies to a content filter map |
| 31 | BAD_WORD_BAD_TLD { |
| 32 | expression = "FISHY_TLD & ( BAD_WORDS | BAD_WORDS_DE )" |
| 33 | score = 10.0; |
| 34 | } |
| 35 | # Forged with bad policies and not fwd host, keep bad policy symbols |
| 36 | FORGED_W_BAD_POLICY { |
| 37 | expression = "( -g+:policies | -R_SPF_NA) & ( ~FROM_NEQ_ENVFROM | ~FORGED_SENDER ) & !WHITELISTED_FWD_HOST & !DMARC_POLICY_ALLOW" |
| 38 | score = 3.0; |
| 39 | } |
| 40 | # Keep negative (good) scores for rbl, policies and hfilter, disable neural group |
| 41 | WL_FWD_HOST { |
| 42 | expression = "-WHITELISTED_FWD_HOST & (^g+:rbl | ^g+:policies | ^g+:hfilter | ^g:neural)" |
| 43 | } |
| 44 | # Exclude X-Spam like flags from scoring from fwd and sieve hosts |
| 45 | UPSTREAM_CHECKS_EXCLUDE_FWD_HOST { |
| 46 | expression = "(-SIEVE_HOST | -WHITELISTED_FWD_HOST) & (^UNITEDINTERNET_SPAM | ^SPAM_FLAG | ^KLMS_SPAM | ^AOL_SPAM | ^MICROSOFT_SPAM)" |
| 47 | } |
| 48 | # Remove fuzzy group from bounces |
| 49 | BOUNCE_FUZZY { |
| 50 | expression = "-BOUNCE & ^g+:fuzzy"; |
| 51 | } |