# # SA2Exim # # Convert SpamAssassin rules to Exim ACL's # http://www.ols.es/exim # david ols.es # # Usage: # # define SA2E_VAR's in your main config: # # SA2E_VAR1 = acl_m0 # must not be modified or used in predata/data/mime acl # SA2E_VAR2 = acl_m1 # must not be modified or used in predata/data/mime acl # SA2E_VAR3 = acl_m2 # could be modified and used elsewhere # SA2E_MAXSCORE = 8000 # Spam level (SA score x 1000) # # add this line to mail_from acl: # # warn acl = sa2exim_predata # # add this line to mime acl: # # warn acl = sa2exim_mime # # add those lines to data acl: # # warn acl = sa2exim_data # # deny condition = ${if >{$SA2E_VAR3}{SA2E_MAXSCORE}} # message = SPAM not welcome ($SA2E_VAR3 pints) sa2exim_predata: warn set SA2E_VAR1 = set SA2E_VAR3 = 0 accept sa2exim_mime: accept condition = $mime_is_rfc822 accept condition = ${if match {$mime_content_type}{^text\\/}{0}{1}} !condition = $mime_is_coverletter {mime_acl} accept sa2exim_data: {data_acl} accept {extra_acl}