{"id":195,"date":"2006-02-19T10:53:00","date_gmt":"2006-02-19T10:53:00","guid":{"rendered":"http:\/\/www.bullit.net\/al\/wordpress\/?p=195"},"modified":"2007-09-23T14:33:53","modified_gmt":"2007-09-23T13:33:53","slug":"morgins-mail","status":"publish","type":"post","link":"https:\/\/www.bullit.net\/al\/2006\/02\/19\/morgins-mail\/","title":{"rendered":"Morgins Mail"},"content":{"rendered":"<p>I spent a little time this morning sorting out some issues with mail on Morgins. Filtering now works (#Exim Filter does anyway), so you can create a .forward file in $home and send your spam elsewhere&#8230;<\/p>\n<pre>---\r\nal@morgins ~ $ cat .forward\r\n# Exim filter\r\n\r\nif\r\n  $h_X-Spam_bar: CONTAINS \"+++++\"\r\nthen\r\n  save $home\/.maildir\/.Spam\/\r\n  finish\r\nendif\r\n---<\/pre>\n<p>in this case mail with a spam score of 5 or more will get saves into a maildir folder called Spam. I have also edited Exim to allow &#8216;foo+bar&#8217; users to work (like they used to with Sendmail on Avoriaz), so &#8216;al+test&#8217; will be delivered to &#8216;al&#8217;&#8230; I wondered why I had not been receiving some mail! D&#8217;oh!<\/p>\n<p>Still not quite happy though. I wanted to add headers for spam based on conditions, but when I tried it thinks didn&#8217;t work. What I tried was:<\/p>\n<pre>---\r\n  warn     message    = X-Spam-Score: $spam_score ($spam_bar)n\r\n           condition  = ${if &lt;{$spam_score_int}{50}{1}{0}}\r\n           spam       = nobody:true\r\n\r\n  warn     message    = X-Spam-Flag: YESn\r\n                        X-Spam-Score: $spam_score ($spam_bar)n\r\n                        X-Spam-Report: $spam_reportn\r\n           condition  = ${if &gt;{$spam_score_int}{50}{1}{0}}\r\n           spam       = nobody:true\r\n---<\/pre>\n<p>but this did not do what I expected. What I wanted was just an X-Spam_Score header for a $spam_score_int of less than 50, and then additional X-Spam-Flag and X-Spam-Report if $spam_score_int is more than 50 (hmm, what happens if it \/is\/ 50?). Ideas?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent a little time this morning sorting out some issues with mail on Morgins. Filtering now works (#Exim Filter does anyway), so you can create a .forward file in $home and send your spam elsewhere&#8230; &#8212; al@morgins ~ $ cat .forward # Exim filter if $h_X-Spam_bar: CONTAINS &#8220;+++++&#8221; then save $home\/.maildir\/.Spam\/ finish endif &#8212; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-colo","category-tech"],"_links":{"self":[{"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":0,"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bullit.net\/al\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}