[Exim] FAQ Q1003

Góra strony
Delete this message
Reply to this message
Autor: dmitry_v_ivanov
Data:  
Dla: exim-users
Temat: [Exim] FAQ Q1003
Hello, All.
Q1003 :I want to rewrite local adresses in mail that goes to the outside world,
but not for messages that remain the local intranet.

I think that I have more simple answer rather than in FAQ.
I don't know is it wrong or not, but it works:

Rewriting rules:

root@mydomain      "${if eq {${extract{2}{@}{$h_to:}}}{mydomain}\
                                   {root@mydomain}{dmitry_v_ivanov@???}}" \
                                   wFfs
so, if header_to contains !*.mydomain, a message goes out with
internet sender address, other cases with local address. This is
very simple example, for more complicated cases you may lookup
localdomains from file or $local_domains, and do rewrite for any
user that you want.


I don't know how to apply this rule for many recipiens but according
to exim spec, you may test the $received_for and compare $recipients
domains with your local_domains.

Sorry for my english ;-)

Dmitry.