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

Top Page

Reply to this message
Author: Timo Boettcher
Date:  
To: exim-users
Subject: [exim] acl or condition to protect spam-reclassification suffixes
Hi,

I am trying to setup exim with dspam.
Since dspam can relearn misscalssified 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?
I have tried some conditions and acls, but I am not sure how to do it.
I would like to put the suffixes in variables, but even that didn't
work the way i wanted, so I hardcoded them.
Is there anybody who has done something like this?
How can I debug such a thing (not sure if this would help, I am
pretty much a newbie with exim and need some basic advice first)?





localpartlist dspam_suffix_spam = -spam
localpartlist dspam_suffix_ham = -ham:-nospam:-notspam


deny    message       = You will not decide what I consider spam
        domains       = +local_domains
        condition     = ! or{{eq{authenticated_id}{${local_part}@$domain}}{eq{$sender_host_address}{127.0.0.1}}}
        local_parts   = *-spam : *-nospam : *-notspam : *-ham



dspam_addspam:
driver = accept
# local_part_suffix = dspam_suffix_spam
# condition = ${if { eq{ {$authenticated_id} {${local_part}@$domain} } } {1}{0}}
condition = ${if and{ {eq{$authenticated_id} {${local_part}@$domain}} {eq{$local_part_suffix}{-spam}} } {1}{0}}
transport = addspam
require_files = DSPAM_HOMEPATH:DSPAM_BINPATH

dspam_addham:
driver = accept
# local_part_suffix = dspam_suffix_ham
# condition = ${if { eq{ {$authenticated_id} {${local_part}@$domain} } } {1}{0}}
condition = ${if and{ {eq{$authenticated_id} {${local_part}@$domain}} {or{ {eq{$local_part_suffix}{-nospam}} {eq{$local_part_suffix}{-notspam}} {eq{$local_part_suffix}{-ham}} }} } {1}{0}}
transport = addham
require_files = DSPAM_HOMEPATH:DSPAM_BINPATH

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


TIA

Timo