Re: [exim] How to rewrite From: header of offsite forwards o…

Góra strony
Delete this message
Reply to this message
Autor: Pete Schaefers
Data:  
Dla: Exim-users
Temat: Re: [exim] How to rewrite From: header of offsite forwards only to prevent Amazon SES 554 error
On 2018-03-24 13:22, Jeremy Harris wrote:
> On 24/03/18 07:08, Pete Schaefers via Exim-users wrote:
> > senders = *@+local_domains
>
> That almost certainly will not work if the "local_domains"
> list has more than one element, and I'm surprised it works
> at all. You're abusing list-syntax there.
>
> Instead, use a generic "condition=" router condition with
> a value constructed using ${if } involving $sender_address_domain
> and match_domain.
> --
> Jeremy


I appreciate your help. Clearly I'm just hacking at it, but I'm trying
to learn as I do.

I checked and "local_domains" comes from "domainlist local_domains =
lsearch;/etc/localdomains" and /etc/localdomains indeed has a list all
domains in it. Oddly it still works as intended in my tests. On further
looking I'm guessing "*@+local_domains" would be used in a rewrite.

Based on you comments I'm thinking this what you meant:

condition = ${if match_domain {$sender_address_domain}{+local_domains}}

It also seems to work on initial tests, but I'm learning that just
because EXIM accepts the config file and even seems to do what I want
doesn't make it right.

-Pete