Re: are outgoing mails scan by Clam and SA (Gordon Dickens)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: are outgoing mails scan by Clam and SA (Gordon Dickens)

Kebba Foon
Hi Gordon,

i was able to set scanning for outgoing mails our my exim4u config: here
are the settings i added:

on the router section at the very top i added this:

spamcheck_router:
 
    # When to scan a message :
    #   -   it isn't already flagged as spam
    #   -   it isn't already scanned
    condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
    driver = accept
    transport = spamcheck


and then on the transport section i have this there:

spamcheck:
    debug_print = "T: spamassassin_pipe for $local_part@$domain"
    driver = pipe
    command = /usr/sbin/exim4 -oMr spam-scanned -bS
    use_bsmtp
    transport_filter = /usr/bin/spamc
    home_directory = "/tmp"
    current_directory = "/tmp"
    user = Debian-exim
    group = Debian-exim
    return_fail_output
    message_prefix =
    message_suffix =

This indeed scan messages and tag them, but even if it tags the messages as spam it will still send them out.
is their any setting i can add on the remote_stmp transport section that it discard emails tag as spam?

Thanks
Kebba


On Wed, 2011-02-09 at 12:00 -0500, [hidden email] wrote:
> Re: are outgoing mails scan by Clam and SA (Gordon Dickens)


_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: are outgoing mails scan by Clam and SA (Gordon Dickens)

gldickens3
Administrator
On 02/28/2011 04:00 AM, Kebba Foon wrote:
> This indeed scan messages and tag them,
> but even if it tags the messages as spam
> it will still send them out. is their any
> setting i can add on the remote_stmp
> transport section that it discard emails
> tag as spam?

Kebba, I don't have any experience scanning outgoing mail in the routers
and transports like you are attempting to do so I can't offer any help.  
However, as I have previously recommended, I think that you can
accomplish what you are trying to do by simply removing the "accept
authenticated = *" statement in the appropriate ACLs.  Specifically and
simply, try commenting out the following line in the acl_check_mime and
acl_check_content ACLs:

accept authenticated = *

All outgoing mail sent to your server over TCP/IP will require
authentication so commenting out this statement should enable spam
checking in the related ACLs for all outgoing mail sent to your server
over TCP/IP.

The primary role of the acl_check_mime ACL is to check for blacklisted
URL links embeded in the mail.  So, by removing the "accept
authenticated = *" statement you therefore scan all authenticated
outgoing mail for blacklisted url links.  Likewise, the primary role of
the acl_check_content ACL is to run spamassassin.  So, by removing the
"accept authenticated = *" statement you therefore run spamassassin on
all authenticated outgoing mail too.  There are other functions
performed by these two ACLs but I think that it will be ok to perform
these other functions on authenticated outgoing mail as well.

Also, if you want to scan outgoing mail that originates locally instead
of over TCP/IP such as outgoing mail generated from Apache (ie.
webmail), then you should likewise comment out the following line in the
acl_check_mime and acl_check_content ACLs too:

accept hosts = :

Obviously, you would need to thoroughly test any modifications such as
this.  These changes that I have suggested should get you close to what
you are looking for.  However, additional modifications may be necessary
to get a completely working configuration and you need to take this on
from here yourself.

FYI,

Gordon Dickens






_______________________________________________
users mailing list
[hidden email]
https://exim4u.org/mailman/listinfo/users