Re: [Exim] RE: previous post

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Stian Grytoyr
Data:  
Para: Dj Statik
CC: exim-users
Asunto: Re: [Exim] RE: previous post
"Dj Statik" <djstatik@???> writes:

| 1. pass all incoming email through spamassassin to check
| if it's junk mail and if so spamassassin attaches
| appropriate headers.


I just set this up yesterday on Exim 4.02, and it seems to
work ok. Here's what I did:

In the routers section:
  # Spam Assassin
  spamcheck_router:
    no_verify
    check_local_user
    # When to scan a message :
    #   -   it isn't already flagged as spam
    #   -   it isn't already scanned
    require_files = ${local_part}:+${home}/.spamassassin/user_prefs
    condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
    driver = accept
    transport = spamcheck


Note that this router was placed just before my existing
local routers. Also, my users have to opt-in by making sure
that the file ~/.spamassassin/user_prefs exists. It can be
empty or it can contain directives.

And in the transports section:
  # Spam Assassin
  spamcheck:
    driver = pipe
    command = /opt/exim/bin/exim -oMr spam-scanned -bS
    use_bsmtp = true
    transport_filter = /local/scripts/spamc -u $local_part
    home_directory = "/tmp"
    current_directory = "/tmp"
    # must use a privileged user to set $received_protocol on the way back in!
    user = exim
    log_output = true
    return_fail_output = true
    return_path_add = false
    message_prefix =
    message_suffix =


This requires that spamd is running. I use -u $local_part to
make spamc run as the user, so that they can put directives
to SpamAssassin in their personal config file. It works like
a charm!

--
Stian Grytoyr