Virtual users need to store save filters in an LDAP database one filter
per attribute like this:
e.g.
mailFilter: if $h_subject: contains "Free" then save /SPAM endif
The router looks like this:
filtered_delivery:
driver = redirect
allow_filter = true
user = mail
hide condition = ${if eq {${lookup ldap
{user="cn=admin,dc=localsurface,dc=com" \
pass=PASS
ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain}, \
dc=localsurface,dc=com?hasMailFilter?sub?}}}{true}{yes}{no}}
hide data = # Exim Filter ${lookup ldap
{user="cn=admin,dc=localsurface,dc=com" pass=PASS \
ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain},\
dc=localsurface,dc=com?mailFilter?sub?}}
file_transport = address_file
The transport looks like this:
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660
hide quota = ${lookup ldap {user="cn=admin,dc=localsurface,dc=com"
pass=PASS \
ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain},dc=localsurface,\
dc=com?quota?sub?}}M
quota_is_inclusive = false
quota_warn_threshold = 80%
quota_warn_message = \
To: $local_part@$domain\n \
Subject: Maibox Limit\n \
\n \
The size of your mailbox has exceed the warning threshold set by
company policy. \
Please clean out your mailbox.\n
maildir_format=true
maildir_tag= ,S=$message_size
Problem:
The router is skipped and nothing is filtered. The router order is correct.
Questions:
First why doesn't it work?
1) Is there a problem with the way I have used data in the router,
specifically # Exim filter ?
2) Is this setup going to have a problem with more than one filter?
Thanks,
Craig
--
Craig Jackson
cjackson@???