Re: [exim] Bounce router based on both sender and recipient

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Mike Brudenell
Data:  
Para: Exim Users
Assunto: Re: [exim] Bounce router based on both sender and recipient
Hi, Jarle -

Am I missing something, but why do you need a *router* to do this? Couldn't
you do it in an *acl_smtp_rcpt ACL* instead? You can test the sender and
recipient address easily then rejects the message with a *deny* if met.
Something like this, perhaps (untested!)…

deny senders    = lsearch;/etc/exim4/ses-suppress
     recipients = lsearch;/etc/exim4/ses-suppress
     message    = …some suitable rejection response text…


When the ACL spots a recipient address listed in ses-suppress *and* also
has a sender address listed there then the recipient is rejected. (By the
way, did you mean to use "ses-suppress" for both senders and recipients
there, by the way? Not "ses-senders" for the sender?)

However think carefully if this is what you want for the "edge cases"…

For example, suppose a sender listed in ses-suppress tried to send a
message to *two* recipients, *only one* of which is listed in ses-suppress?

- Do you want just the listed recipient to be rejected and the message
still to be delivered to the other (unlisted) recipient?
- Or do you want the entire message to be dropped to *all* recipients if
*any* recipient is listed in ses-suppress?

As it stands my suggestion above does the former, not the latter.

Cheers,
Mike B-)

On 8 January 2018 at 19:08, Jarle Hammen Knudsen via Exim-users <
exim-users@???> wrote:

> I have the following router:
>
> send_via_ses:
> driver = manualroute
> debug_print = "R: send_via_ses"
> domains = ! +local_domains
> transport = ses_smtp
> route_list = * email-smtp.eu-west-1.amazonaws.com;
> senders = lsearch;/etc/exim4/ses-senders
>
> If the sender is listed in /etc/exim4/ses-senders the mail is sent via the
> smarthost.
>
> I also have a list of recipient addresses known to bounce in
> /etc/exim4/ses-suppress.
>
> What I am trying to do is define a router which bounces the message if
> both these conidtions are true:
>
>     1. sender is listed in /etc/exim4/ses-suppress
>     2. recipient is listed in /etc/exim4/ses-suppress

>
> If the sender is not listed in /etc/exim4/ses-suppress these two routers
> should be skipped.
>
> I have worked on this for quite some time without success so any help is
> very much appreciated.
>
> --
> Jarle Hammen Knudsen
>
>
> --
> ## 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/
>




--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm