{"id":1955,"date":"2019-03-30T16:54:31","date_gmt":"2019-03-30T16:54:31","guid":{"rendered":"http:\/\/cdblog.cdstealer.com\/?p=1955"},"modified":"2021-09-06T07:12:27","modified_gmt":"2021-09-06T06:12:27","slug":"handy-exim-filters","status":"publish","type":"post","link":"https:\/\/cdblog.cdstealer.com\/?p=1955","title":{"rendered":"Handy Exim Filters"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">For a while now I'd been thinking about how to block spam that is mascarading as myself. Today, I fixed it :)<br>In my exim.conf, I have a section for spam filtering under the \"acl_check_data\" section.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">warn  message = X-Antivirus-Scanned: Clean\nwarn  message = X-Spam-Score: $spam_score\n      spam = mail:true\n      condition = ${if &lt;{$message_size}{80k}{true}{false}}\nwarn  message = X-SA-Status: No\n      spam = mail:true\n      condition = ${if &lt;{$spam_score_int}{29}{true}{false}}\nwarn  message = X-Spam-Report: $spam_report\n      spam = mail:true\n      condition = ${if &gt;{$spam_score_int}{40}{true}{false}}\nwarn  message = Subject: [SPAM] $h_Subject\n      spam = mail:true\n      condition = ${if &gt;{$spam_score_int}{30}{true}{false}\nwarn  message = X-SA-Status: Yes\n      spam = mail:true\n      condition = ${if &gt;{$spam_score_int}{30}{true}{false}}\n<span style=\"color: #ff0000;\">warn message = X-Spam-Score: 80<\/span><br><span style=\"color: #ff0000;\">spam = mail:true<\/span><br><span style=\"color: #ff0000;\">condition = ${if !match{$sender_host_address:}{\"(127.0.0.1|198.16.181.0\/24)\"}{true}{false}}}}<\/span><br><span style=\"color: #ff0000;\">condition = ${if match{$sender_address:}{\"(me|other.me)\"@}{true}{false}}<\/span><br><span style=\"color: #ff0000;\">condition = ${if match{$h_to:}{\"(me|other.me)\"@}{true}{false}}<\/span><br>deny  message = This message scored $spam_score spam points.\n      spam = mail:true\n      condition = ${if &gt;{$spam_score_int}{44}{true}{false}}\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I also added the following under the acl_check_helo:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># If the HELO pretend to be this host\ndeny    condition = ${if or { \\\n                     {eq {${lc:$sender_helo_name}}{cdstealer.com}} \\\n                     {eq {${lc:$sender_helo_name}}{127.0.0.1}} \\\n                     {eq {${lc:$sender_helo_name}}{198.16.181.0\/24}} \\\n                     } {true}{false} }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>For a while now I'd been thinking about how to block spam that is mascarading as myself. Today, I fixed it :)In my exim.conf, I have a section for spam filtering under the \"acl_check_data\" section. warn message = X-Antivirus-Scanned: Clean warn message = X-Spam-Score: $spam_score spam = mail:true condition = ${if &lt;{$message_size}{80k}{true}{false}} warn message = &hellip; <a href=\"https:\/\/cdblog.cdstealer.com\/?p=1955\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Handy Exim Filters<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1955","post","type-post","status-publish","format-standard","hentry","category-gentoo"],"_links":{"self":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1955"}],"version-history":[{"count":12,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1955\/revisions"}],"predecessor-version":[{"id":2122,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1955\/revisions\/2122"}],"wp:attachment":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}