Re: [Exim] Reject spam after DATA, Multiple user Preferences…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Alan J. Flavell
Date:  
À: Exim users list
Sujet: Re: [Exim] Reject spam after DATA, Multiple user Preferences (fwd)
[I was under the impression that I was mailing this reply to the list,
but I now see that I was mistaken. So here is a copy for the list.]


> Would it be possible to provide me the setup on how to do this or refer me
> to a document on how to do this.


I'm making no claims for optimal coding, but something like this works
for us (comment-out the "log_message"s when you're happy that it's
doing what you want):

Main configuration:

addresslist suckers = recipient@??? : etc.

(or reference the contents of an external file or db, as you wish)


RCPT ACL:

#  acl_m4 will compute the spam acceptance level of this user,
#         the value is needed only locally;
#          1 = default, 2 = spam suckers, at present
#  acl_m5 will note the spam acceptance level of this run: it's
#         needed to be retained throughout the message,
#
#    undef = no recipient yet
#    1 = normal antispam; defer any suckers
#    2 = sucker recipients; defer any normals.


  warn set acl_m4 = 1
  warn recipients = +suckers
       log_message = TEST: sucker because of recipient $local_part@$domain
       set acl_m4 = 2
  warn local_parts = postmaster : abuse
       domains = +local_domains : +relay_domains
       log_message = TEST: sucker because of local part $local_part
       set acl_m4 = 2


  warn condition = ${if def:acl_m5 {no}{yes}}
       set acl_m5 = $acl_m4
#       log_message = TEST: acl_m5 undefined, setting it to $acl_m4


  defer condition = ${if eq{$received_protocol}{asmtp} {no}{yes}}
     condition = ${if ={$acl_m4}{$acl_m5} {no}{yes}}
     log_message = TEST: defer because user is $acl_m4 but run is $acl_m5
     message = Deferred - please try this recipient again later



Of course you'll also need some tests which bypass your normal
spam-rating procedures depending on which kind of recipient run you're
dealing with: details depend on just how you've got that set up at the
moment, I guess. The above is only the mechanism for doing the
deferring. Is that OK?

cheers