Author: Cyborg Date: To: exim-users Subject: [exim] forany() with multiply recipients
Hi all,
lets say we have a mail with these two recipients:
info@???
info@???
both domains are hosted on the same server, but with different rules for
spamhandling:
a.com : if detected as spam, move it to another mailbox
z.com : if detected as spam, send back a 550 error
on the acl_check_data level there is a condition check like this:
accept condition = ${if forany{<, $recipients}{match{${lookup mysql
{SELECT 1 FROM mail_actions WHERE
domain="${quote_mysql:${domain:$item}}" and type='move' LIMIT 1 }}}{1}}
{1}{0}}
As with two recipients, one matching, one not matching , this condition
would be true, this email would be accepted.
But hey, the other recipient does not want to have the mail, as he said,
send a 550 back to the sender.
Is there a way on ACL level to handle both ie. split the processing into
two seperate mails ?
Before you reply "set all rules to the same result" , the problem gets
even worse, if you have a mail in your recipient list, thats does not
belong to your server at all. The SQL will not give a result for this
domain. It happend in real life, because the mail got forwarded from
another server, which handled a.com and z.com is handled by our server.
BTW.. hows is this expanded with more than one recipient ?