Re: [Exim] headers_rewrite problems

Top Pagina
Delete this message
Reply to this message
Auteur: Dave C.
Datum:  
Aan: Alec Edworthy
CC: exim-users
Onderwerp: Re: [Exim] headers_rewrite problems
Becuase 'headers_rewrite' only rewrites the headers, it does not change
the envelope sender (MAIL FROM:)

Personally, I would just put it in the global rewrite section, and use
globally valid addresses everywhere, even internally (Even if some users
still send with the internal one, go ahead and rewrite it anyway - I'm
assuming any internal users that get mail "From" the globally valid
address would be able to reply to it anyway?)

If you still want to do this crazy thing, try checking the return_path
option. Its not a 'rewrite rule' but just an expansion, so you'd have to
write a conditional expansion with a regex and a replacement. (Which I
am absolutely no good at - if you need help with that someone else will
have to speak up)

On Wed, 18 Jul 2001, Alec Edworthy wrote:

> Hi,
>
> I have got the following in my exim configuration file in the Transports
> section:
>
> remote_smtp:
>      driver = smtp
>      headers_rewrite = *@linuxvm.local    $1@??? f

>
> To rewrite an address such as alec@??? as alec@???
> but it is not doing the rewriting and the recipient SMTP server (i.e. the
> one at the receivers end) is rejecting my mails due to not being able to
> route to sender alec@???. I have also tried putting hf at the end
> of the above rewrite line.
>
> If I put:
>
> *@linuxvm.local    $1@???

>
> in the Rewrite Configuration section at the end of the file then the rewrite
> is done correctly and the recipients SMTP server sees only the
> edworthyuk.co.uk domain and so does not fail the message, BUT this operates
> on all e-mails (internal and external) whilst I only want it to operate on
> e-mails for external addresses..
>
> Why is the header_rewrite not working correctly in the remote_smtp: part,
> and if it is working correctly, then how can I do the rewrite another way?
> Is it possible to put other checks (a regular expression for example) in the
> Rewrite Configuration section at the end of the file?
>
> I am using Exim 3.22 on SuSE 6.4.
>
> If this has been answered elsewhere in the mailing list and/or other
> documentation then I apologise for asking a repeat question, but can you
> please point me in the direction of the relevant area.
>
> Thank you, Alec
>
> --
> Alec Edworthy
> alec@???
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>


--