Autor: Nicholas Jacobs Fecha: A: exim-users Asunto: Re: [exim] exim rewrites the "From:" address
A dom, 26-02-2023 às 12:55 +0000, Andrew C Aitchison via Exim-users
escreveu: > On Sat, 25 Feb 2023, Nick via Exim-users wrote:
>
> > When I send an email using: mailx -r , specifying the from address
> > in
> > the form name@domain, exim rewrites the domain of the From: address
> > and
> > Sender: address to the first entry in the local_domains list. My
> > server
> > hosts multiple domains, so I need to be able to specify the domain
> > part
> > of the email address.
> >
> > My server uses Debian so the configuration is generated from files
> > exim4.conf.localmacros (where I set: MAIN_FORCE_SENDER to yes) and
> > update-exim4.conf.conf (where I set dc_other_hostnames to the list
> > of domain names on this server). But I checked the generated file
> > /var/lib/exim4/config.autogenerated and it contains:
> >
> >
> > .ifndef MAIN_FORCE_SENDER
> > local_from_check = false
> > local_sender_retain = true
> > untrusted_set_sender = *
> > .endif
>
> If you *set* MAIN_FORCE_SENDER, then that section will *not* be
> executed
> (there is an "n" in "ifndef"). I don't think that is what you meant.
>
> > which according to my understanding of the documentation should
> > make
> > exim leave the from address specified in the command
> > mailx -r name@domain destination
> > unchanged. But on restarting exim and sending an email with mailx -
> > r,
> > it doesn't, it rewrites the domain name.
> >
> > Why is it doing this and how can I stop it?
>
> --
> Andrew C. Aitchison Kendal, UK
> andrew@??? Good point. So I deleted the MAIN_FORCE_SENDER line from
exim4.conf.localmacros,
ran update-exim4.conf,
ran /etc/init.d/exim4 restart,
and then ran exim -bP macros | grep MAIN_FORCE_SENDER
which now produced no output.
Then I ran mailx -r with the desired from address.
All this made absoultely no difference. Exim still rewrites the "From"
address.
(Actually, that bad MAIN_FORCE_SENDER line was inserted in a misguided
previous attempt to fix the problem.)