[exim] binning mails on delivery based on headers

Startseite
Nachricht löschen
Nachricht beantworten
Autor: John Oxley
Datum:  
To: exim-users
Betreff: [exim] binning mails on delivery based on headers
Okay I have mails coming through a spam/virus filter to a separate box
running exim 4.52 and courier-IMAP/POP on FreeBSD 5.4.

I am delivering mail virtually to users from a MySQL table. In the
messages there is the X-Spam-Score header. I want to on _this_ box, to
throw away mail if it is above sa_refuse or tag (modify the subject line
and add X-Spam-Flag header) it if it is above sa_tag on a per user
basis.

Do I do this in the routers or transports sections? If so how do I do
it? Below is my routers and transports section. Where would I put what
to do what I want.

------------------routers------------------------------

MAILDIR_FILE = SELECT smtp from users where localpart = \
'${quote_mysql:$local_part}'
SA_TAG = SELECT sa_tag from users where localpart = \
'${quote_mysql:$local_part}'
SA_REFUSE = SELECT sa_refuse from users where localpart = \
'${quote_mysql:$local_part}'
virtual_domains:
driver = redirect
allow_fail
# Lookup the maildir directory
data = ${lookup mysql{MAILDIR_FILE}}
local_part_suffix = -*
local_part_suffix_optional
retry_use_local_part
file_transport = virtual_delivery
reply_transport = address_reply
pipe_transport = address_pipe

------------------transports---------------------------
virtual_delivery:
driver = appendfile
envelope_to_add
return_path_add
mode = 0660
maildir_format = true
create_directory = true
directory = ${lookup mysql{MAILDIR_FILE}}
user = 26
group = 6


TIA

-John