Auteur: Brian Spraker Date: À: exim-users Sujet: [exim] Still Trying to Figure Out Spam Settings..
Hi all,
I posted a bit back about trying to figure out how I can allow users to modify
their own spam settings.
A database is setup with three fields - 'spam_enable', 'spam_flag', and
'spam_delete'.
under acl_check_rcpt, this has been added - and it does work appropriately
(because this occurs with each "rcpt to" command and can reject recipients):
accept
condition = ${if eq{${lookup mysql{SELECT spam_enable FROM users WHERE
account="${local_part}@${domain}"}}}{N}}
The above condition checks to see if the user has the 'spam_enable' feature set
to "N" for No. If so, then it will accept the mail and skip checking blacklists
and such.
The same line was added into the acl_check_data area.
However, as another newsgroup member posted, the ${local_part} and ${domain} do
not work here - because the possibility of having multiple recipients.
This is also causing a snag in the same area (acl_check_data) where I'm not able
to pull the spam_flag and spam_delete values. The spam_flag item is the
user-set threshold that will just flag the e-mail as spam in the subject line.
The spam_delete item is the user-set threshold that will delete the mail.
So, I basically am wondering if there is some kind of way - like a while loop -
that will go through each of the recipients and check these three things in the
acl_check_data routine.
I'm quite lost with trying to figure out some kind of solution for this. The
Exim config file isn't like scripting PHP or anything like that :)