# # Now look for whitelists which get excused the spam checks. # # [1/2] Remove spoofed/bogus whitelist header. # :0 fhw * ^X-whitelist: | $FORMAIL -I "X-whitelist" # # [2/2] Add a whitelist tag if appropriate # :0 fhw * ? test -s $HOME/.procmail_whitelist * ? $FORMAIL -rxTo: | fgrep -qisf $HOME/.procmail_whitelist | $FORMAIL -A "X-whitelist: yes" # # Archive bounces - they're almost certainly bogus. # :0 *(Return-Path:).*(<>) .Automated.bounces/ # # Character sets we care little for. # UNREADABLE='[^?"]*big5|windows-125[145]|iso-2022-jp|iso-2022-kr|euc-kr|gb2312|ks_c_5601-1987|koi8-r' # # Foreign spam [1/2]: In the header? # :0 * 1^0 $ ^Subject:.*=\?($UNREADABLE) * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE) * !^X-whitelist: yes .spam.foreign/ # # Foreign spam [2/2]: In the body? # :0 * ^Content-Type:.*multipart * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE) * !^X-whitelist: yes .spam.foreign/ # # Bogus message-ids # ["space" + "tab"] # :0H * ^Message-ID:[ ]*$ .bogus.message-id/ :0H * ^Message-ID: <[ ]*> .bogus.message-id/ # # Check for invalid Message-Id: RFC822, Section 4.6.1: no local part :0H * ^Message-Id: <[^@]+> .bogus.message-id/ # # Check for invalid Message-Id: Same RFC, same section: Two @'s :0H * ^Message-Id: <.*@.*@.*> .bogus.message-id/ # # Check for invalid Message-Id: Same RFC, same section: no host/domain part :0H * ^Message-Id: <[^@]+@[^A-Za-z0-9\[] .bogus.message-id/ # # Messages should always have a date. # :0H * !^Date: .bogus.no-date/