Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
public:email_related_notes [2016/09/22 07:14]
Fufu Fang
public:email_related_notes [2018/03/31 01:38] (current)
Line 1: Line 1:
 +====== Email Related Notes ======
 +===== Exim4 Spam Filter Configuration =====
 +This is the local spam filter configuration for Exim4. This server is using mbox, the following set up should move spam mails into a separate folder. ​
 +  * Follow this guide: https://​wiki.debian.org/​Exim#​Spam_scanning
 +  * Replace the relevant segment with these:
 +<​code>​
 +  warn
 +    spam = Debian-exim
 +    add_header = X-Spam-Score:​ $spam_score\n\
 +              X-Spam-Score-Int:​ $spam_score_int\n\
 +              X-Spam-Bar: $spam_bar\n\
 +              X-Spam-Status:​ $spam_report
 +    remove_header = Subject
 +    add_header = Subject: ***SPAM (score:​$spam_score)*** $h_Subject:
 +</​code>​
 +   * You should not put ''​spam = Debian-exim:​true''​ in, somehow that forces Exim to classify every email as a spam. 
 +   * The relevant section might be in ''/​etc/​exim4/​exim4.conf.template''​ or ''/​etc/​exim4/​conf.d/​acl/​40_exim4-config_check_data'',​ depending whether you store the configuration as a single file or in multiple smaller files.
 +
 +
 +   * Add ''​${HOME}/​.forward''​ with the following content:
 +<​code>​
 +# Exim filter
 +if "${if def:​h_X-Spam-Score {def}{undef}}"​ is "​def"​
 +then
 +    save $home/​mail/​Spam
 +    finish
 +endif
 +</​code>​
 +==== Spam denial ====
 +Rather than re-writing the subject line of the spam, and adding extra header lines, you can also consider denying the spam message outright with an error message: ​
 +<​code>​
 +deny
 +      spam = Debian-exim
 +      message = You have sent a suspected spam. Please re-send your email to spam@auti.st
 +</​code>​
 +
 +==== References ====
 +  * https://​www.win.tue.nl/​~martijna/​Debianstuff/​
 +  * http://​www.freesoftwaremagazine.com/​articles/​exim_and_anti_spam_spamassassin
 +
 +
 +===== Standard Email Test Strings =====
 +==== Spam ====
 +http://​spamassassin.apache.org/​gtube/​
 +<​code>​
 +XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
 +</​code>​
 +
 +==== Virus ====
 +http://​www.eicar.org/​86-0-Intended-use.html
 +<​code>​
 +X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
 +</​code>​
 +
 +
  
  • public/email_related_notes.txt
  • Last modified: 2018/03/31 01:38
  • (external edit)