Re: [Exim] Masquerade needed for outbound mail.

Top Pagina
Delete this message
Reply to this message
Auteur: Xander D Harkness
Datum:  
Aan: krelvinaz
CC: exim Users
Onderwerp: Re: [Exim] Masquerade needed for outbound mail.
krelvinaz@??? wrote:

>Xander D Harkness wrote
>
>
>>krelvinaz@??? wrote:
>>
>>
>>>The Domain.name is currently always the same.
>>>
>>>send_to_smart_host:
>>> driver = manualroute
>>> domains = ! mailhost.domain.name
>>> route_list = * mailhost.otherdomain.name
>>> transport = remote_smtp
>>> no_more
>>>
>>>This is the end of the chain router.. so it takes everything the other routers didn't know about and smart hosts it to another server in another domain for delivery to the internet.
>>>
>>>what do I need to put in the transport which currently looks like:
>>>
>>>remote_smtp:
>>> driver = smtp
>>>
>>>Which I will change to (and update the above router to use)
>>>
>>>smarthost_remote_smpt:
>>> driver = smtp
>>>
>>>so that the outbound from is changed if needed from
>>>
>>>user@??? ->>> user@???
>>>
>>>I assume it is a
>>>
>>> headers_rewrite = ???
>>>
>>>Never done rewriting before.
>>>
>>>Or am I going to have to do something else.
>>>
>>>
>># There are no rewriting specifications in this default configuration file.
>>
>>begin rewrite
>>#Here you can stick
>>*@server.domain.name      $local_part@???

>>
>># or
>>*@*.domain.name             $local_part@???

>>
>>
>
>Unfortunately this is not going to work because it will rewrite all hostname.domain.com to domain.com, even if it is staying inside the network.
>
>I need to only change it when it is going to leave the local network to the Internet.
>
>Thats why I think I need to do this in the outbound transport.
>
>


There is an example in the Exim book which you could customise :-)

*@*.hitch.example      "${if !eq {$sender_host_address}{}\
                                        {$1@???}fail}"


senderhost address matches the empty string for locally generated mails
- I guess just stick in something that will match all your internal
hosts ;-)
Kind regards
Xander