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…
--- al@morgins ~ $ cat .forward # Exim filter if $h_X-Spam_bar: CONTAINS "+++++" then save $home/.maildir/.Spam/ finish endif ---
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 ‘foo+bar’ users to work (like they used to with Sendmail on Avoriaz), so ‘al+test’ will be delivered to ‘al’… I wondered why I had not been receiving some mail! D’oh!
Still not quite happy though. I wanted to add headers for spam based on conditions, but when I tried it thinks didn’t work. What I tried was:
---
  warn     message    = X-Spam-Score: $spam_score ($spam_bar)n
           condition  = ${if <{$spam_score_int}{50}{1}{0}}
           spam       = nobody:true
  warn     message    = X-Spam-Flag: YESn
                        X-Spam-Score: $spam_score ($spam_bar)n
                        X-Spam-Report: $spam_reportn
           condition  = ${if >{$spam_score_int}{50}{1}{0}}
           spam       = nobody:true
---
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?
Leave a Reply