[Exim] Spamassassin and Exim 3.22 not working together

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Leigh Dodd
Fecha:  
A: exim-users
Asunto: [Exim] Spamassassin and Exim 3.22 not working together
Well I got around the pipe problem (funny if you misplace the "end"
command line)

So I've compiled and install Spamassassin 2.44 and tested it with the
Test files (sample-nospam and sample-spam) and I get the correct out
files.

I've edited the /etc/mail/spamassassin/local.cf so that rewite_subject
is set to 1
Added the bits for Exim (3.22) config file (see below)
Started spamd with -d and -a options only

Now if I run exim via command

"Exim -d9 -C /usr/local/exim/configure.spam -v test@???"

Filling in the From: To: Subject: Message lines, the email gets sent
To the test account.

NONE of the headers show any reference to spamassassin.

By adding various text like Viagra to Subject and message, I still don't
See any SPAM Subject markers

Looking at the debug lines, it appears the spamassassin NOT being
called.

Anyone help out ?

BTW. I'm having to work on a live system so I can't simple upgrade to
Exim 4 at the moment
As someone on the Spamassassin list suggested.

Thanks

Leigh
.
.
.
######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


# A transport is used only when referenced from a director or a router
that
# successfully handles an address.

# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp

# This transport is used for local delivery to user mailboxes in
traditional
# BSD mailbox format. By default it will be run under the uid and gid of
the
# local user, and requires the sticky bit to be set on the /var/mail
directory.
# Some systems use the alternative approach of running mail deliveries
under a
# particular group instead of using the sticky bit. The commented
options below
# show how this can be done.

local_delivery:
driver = appendfile
file = MAILBOX_DIR/${local_part}
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660

# This transport is used for handling pipe deliveries generated by alias
# or .forward files. If the pipe generates any standard output, it is
returned
# to the sender of the message as a delivery error. Set
return_fail_output
# instead of return_output if you want this to happen only when the pipe
fails
# to complete normally. You can set different transports for aliases and
# forwards if you want to - see the references to address_pipe in the
directors
# section below.

address_pipe:
driver = pipe
return_fail_output

# This transport is used for handling deliveries directly to files that
are
# generated by aliassing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
user = daemon
mode = 0644

# This transport is a variant of address_file that does not specify user
# It is used in forwardfile to deliver to file archives out of a user's
# .forward using that user's euid, instead of daemon

address_file_from_forward:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
mode = 0664
mode_fail_narrower = false

# This transport is used for handling autoreplies generated by the
filtering
# option of the forwardfile director.

address_reply:
driver = autoreply


# Spam Assassin
spamcheck:
    driver = pipe
    command = /usr/local/exim/bin/exim -oMr spam-scanned -C
/usr/local/exim/configure.spam -bS
    transport_filter = /opt/spamassassin/bin/spamc
    bsmtp = all
    home_directory = "/tmp"
    current_directory = "/tmp"
    # must use a privileged user to set $received_protocol on the way
back in!
    user = exim
    group = exim
    return_path_add = false
    log_output = true
    return_fail_output = true
    prefix =
    suffix =
######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################


# Spam Assassin
spamcheck_director:

    # do not use this director when verifying a local-part at SMTP-time
    no_verify


    # When to scan a message :
    #   -   it isn't already flagged as spam
    #   -   it isn't already scanned
    #   -   it didn't originate locally (as long as I don't harbor
spammers :-))
    condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} }
{1}{0}}"
    driver = smartuser
    transport = spamcheck


# Local addresses are those with a domain that matches some item in the
# "local_domains" setting above, or those which are passed back from the
# routers because of a "self=local" setting (not used in this
configuration).

# Map official names to user names. Must not rewrite the result
# as the rewriting rules map them back into official names....
official_names:
driver = aliasfile
file = /usr/local/exim/official_names
search_type = lsearch
user = exim
file_transport = address_file
pipe_transport = address_pipe
no_rewrite
.
.
.
..etc