[SA-exim] devnull relayed spam?

Tor Slettnes tor at slett.net
Wed Nov 10 15:02:21 PST 2004


[Kilian, sorry for the duplicate; I had the wrong address for the 
SA-Exim list the first time].


Kilian Krause wrote:

>>     whitelist_from_rcvt   *@*   debian.org
>>
>you don't seriously expect me to WHITELIST 80% of my SPAM source, eh?
>(for the example of the .forward on a friend's box..)
>

As I was saying, with SA-Exim that is your only option, unless you also
want to REJECT mail from that server (thus creating headaches for their
postmaster). Because it runs outside Exim's ACL subsystem, you don't
have access to the same sophisticated conditional evaluation that you do
with, for instance, Exiscan-ACL (included in Debian's
"exim4-daemon-heavy" package).

You did not follow those links I posted, huh?

>Whitelisting the *host* would cause all the spam hit unfiltered my
>inbox, that's why i want to *NOT* produce collateral spam, but just
>accept and stuff it away into /dev/null...
>
Below is how I do this with Exiscan-ACL.  (Well, almost; this is a
slight simplification).   I still send all mail from external sources to
SpamAssassin; but if it comes from a host in my
/etc/mail/whitelist-hosts file, I never reject it.  I also add a
"X-Spam-Status:" header, so that my MDA (Cyrus) can filter it into the
recipient's Junk folder.


  # 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, but the sending host is
  # in our whitelist, accept the mail anyway.
  #
  warn
    set acl_m9  = ham
    spam        = mail
    set acl_m9  = spam
    !hosts      = /etc/mail/whitelist-hosts
    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






More information about the SA-Exim mailing list