Mailing List Archive

exim4 rewriting - need a hint
Hi

I've got a exim4 mailserver here and need a conditional header rewriting.

Current situation:
email user@cgv.tugraz.at

We got a alias file which sorts like:

user: sievescript,user1@external.domain

and the siecescript sorts the emails in local cyrus mailboxes.

Now the server at user1@external.domain has a SPF setup which refuses
the emails (sure, a alias does not rewrite anything).

I want to rewrite the envelope-from of the outgoing mail to
user1@external.domain, but not for the local sieve script.


The basic rewrite rule seems to be easy, but where do I put it best with
which condition best?

Thank you.


MfG,
Lars Schimmer
--
-------------------------------------------------------------
TU Graz, Institut für ComputerGraphik & WissensVisualisierung
Tel: +43 316 873-5405 E-Mail: l.schimmer@cgv.tugraz.at
Fax: +43 316 873-5402 PGP-Key-ID: 0x4A9B1723
Re: exim4 rewriting - need a hint [ In reply to ]
On 24/01/2019 08:58, Lars Schimmer via Exim-users wrote:
> I want to rewrite the envelope-from of the outgoing mail to
> user1@external.domain, but not for the local sieve script.

Short answer: you can't do that.

Longer answer: you're asking for two different messages -
one modified, one not. The only (not very) convenient
way to get that will be loop one variant round through
a different set of exim actions (probably best to
do that for the one you want modified).


Or, write your sieve script to understand the modified version.
--
Cheers,
Jeremy

--
## 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/
Re: exim4 rewriting - need a hint [ In reply to ]
On 2019-01-24, Lars Schimmer via Exim-users <exim-users@exim.org> wrote:

> Now the server at user1@external.domain has a SPF setup which refuses
> the emails (sure, a alias does not rewrite anything).
>
> I want to rewrite the envelope-from of the outgoing mail to
> user1@external.domain, but not for the local sieve script.

> The basic rewrite rule seems to be easy, but where do I put it best with
> which condition best?

I don't think you can do that with a rewrite rule, you'll probably have
do it the hard way by setting "errrors_to" in the router or transport
responsible for the SMTP delivery.

--
When I tried casting out nines I made a hash of it.

--
## 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/