Re: [exim] forany() with multiply recipients

Page principale
Supprimer ce message
Répondre à ce message
Auteur: ROGERS Richard M
Date:  
À: 'exim-users@exim.org'
Sujet: Re: [exim] forany() with multiply recipients
We have a case a bit like this here, where individuals can set their own preferences/whitelist/blacklist, so handling can change even within the one domain.

The way we deal with it is to set the message handling according to the first recipient's preference; then if the handling is different for later ones they get a 4xx (temporary rejection). It introduces some delays but everyone gets the message handling they want.

Regards

Richard

> -----Original Message-----
> From: exim-users-bounces+richard.rogers=staffs.ac.uk@???
> [mailto:exim-users-bounces+richard.rogers=staffs.ac.uk@exim.org] On
> Behalf Of Cyborg
> Sent: 21 February 2013 10:25
> 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 ?
>
> ${quote_mysql:${domain:$recipients}}
>
>
>
> best regards,
> Marius
>
>
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/