Re: [exim] acl or condition to protect spam-reclassification…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Timo Boettcher
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] acl or condition to protect spam-reclassification suffixes
Hi,

* Timo Boettcher <spida@???>, 08.02.2005, 2:02:55 AM:

> I am trying to setup exim with dspam.
> Since dspam can relearn missclassified spam/ham if it is piped to a
> command, I want to offer that possibility via per-user suffixes like
> user-spam@foo user-ham@foo...
> My problem: how can I keep external users (spammers) from sending
> their spam first to my user-nospam@foo, and then to the user@foo
> himself?


Hate to answer myself, but here is what I did. I assume for my
solution, that all my users use smtp-auth when reclassifying mail as
spam/ham.
It works for me, but I would like to hear your opinions on this.
Perhaps it can be used as an example (most probably for dspam
documentation, but perhaps for exim, too).


#acls:

deny    message       = You will not decide what I consider spam
        domains       = +local_domains
        condition     = ${if  eq{$authenticated_id}{${sg{${local_part}}{\N(-spam|-nospam|-notspam|-ham)\N}{}}@$domain}{0}{1}}
        local_parts   = *-spam : *-nospam : *-notspam : *-ham


#routers:

dspam_addspam:
driver = accept
condition = ${if and{ {eq{$authenticated_id} {${sg{${local_part}}{\N(-spam)\N}{}}@$domain}} {match{${local_part}}{\N(-spam)$\N}} } {1}{0}}
transport = addspam
require_files = DSPAM_HOMEPATH:DSPAM_BINPATH
no_more

dspam_addham:
driver = accept
condition = ${if and{ {eq{$authenticated_id} {${sg{${local_part}}{\N(-nospam|-notspam|-ham)\N}{}}@$domain}} {match{${local_part}}{\N(-nospam|-notspam|-ham)$\N} } } {1}{0}}
transport = addham
require_files = DSPAM_HOMEPATH:DSPAM_BINPATH
no_more

spamscan:
no_verify
condition = "${if or { {eq {$received_protocol}{spam-scanned}} {eq {$received_protocol}{local}} {def:authenticated_id} {eq {$sender_host_address}{127.0.0.1}} } {0}{1}}"
headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
driver = accept
transport = dspam_spamcheck
require_files = DSPAM_HOMEPATH:DSPAM_BINPATH

#transports


dspam_spamcheck:
driver = pipe
command = EXIM_BINPATH -oMr spam-scanned -bS
transport_filter = DSPAM_BINPATH --stdout --deliver=innocent,spam --mode=teft --feature=chained,noise --user ${local_part}@${domain}
use_bsmtp = true
user = mail
group = mail
return_path_add = false
log_output = true
return_fail_output = true
temp_errors = *
home_directory = "DSPAM_HOMEPATH"
current_directory = "DSPAM_HOMEPATH"

addspam:
driver = pipe
command = "DSPAM_BINPATH --user ${sg{${local_part}}{\N(-spam)\N}{}}@${domain} --class=spam --source=error"
return_path_add = false
return_fail_output = true
log_output = true
home_directory = "DSPAM_HOMEPATH"
current_directory = "DSPAM_HOMEPATH"

addham:
driver = pipe
command = "DSPAM_BINPATH --user ${sg{${local_part}}{\N(-nospam|-notspam|-ham)\N}{}}@${domain} --class=innocent --source=error"
return_path_add = false
return_fail_output = true
log_output = true
home_directory = "DSPAM_HOMEPATH"
current_directory = "DSPAM_HOMEPATH"



Timo