Re: [Exim] spamassassin and fackreject

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tor Slettnes
Date:  
À: R.B. (Rick)
CC: exim-users
Sujet: Re: [Exim] spamassassin and fackreject
On Thu, 2004-07-08 at 06:30, R.B. (Rick) wrote:
> Hi Guys,
>
> i user the conf below and i would like to use fakereject on spam messages
> but i see that fakereject is applied only to an accept condition....how can
> i adjust my conf to do this?


"accept" is not actually a condition, it is the beginning of a
"statement".

"control = fakereject" can be used inside a "warn" statement as well.
So long as the mail will eventually get accepted, the effect is that the
sender sees a "550-FAKEREJECT .." response.

An example of this:

  # Invoke SpamAssassin to obtain $spam_score and $spam_report.
  # Depending on the classification, $acl_m9 is set to "ham" or "spam".
  #
  # If the message is classified as spam, and we have not previously
  # set $acl_m0 to indicate that we want to accept it anyway, pretend
  # reject it.
  #
  warn
    set acl_m9  = ham
    spam        = mail
    set acl_m9  = spam
    condition   = ${if !eq {$acl_m0}{accept}{true}}
    control     = fakereject
    logwrite    = :reject: Rejected spam (score $spam_score): $spam_report


  # Add an appropriate X-Spam-Status: header to the message.
  #
  warn
    message     = X-Spam-Status: \
                  ${if eq {$acl_m9}{spam}{Yes}{No}} (score $spam_score)\
                  ${if def:spam_report {: $spam_report}}
    logwrite    = :main: Classified as $acl_m9 (score $spam_score)



# Accept the message
accept