[exim] rule in rewrite section

Góra strony
Delete this message
Reply to this message
Autor: andreas graeper
Data:  
Dla: exim-users
Temat: [exim] rule in rewrite section
hi,
we have an official domain xxx and a not as official yyy, that we use locally
the xxx must be send to smarthost, to be accepted. and reply-to should
be an official address.
so i tried to rewrite sender-addresses :

begin rewrite
*@yyy ${lookup{$1}lsearch(sendnames}}@xxx Ffrs
*@*.yyy ${lookup{$1}lsearch{sendnames}}@xxx Ffrs

if the hostname is not given 'user@domain' (first rule) this works as
expected, but
if hostname is given 'user@???' the second rule does not work.
maybe the first rule does not work, too, and the work is actually done
by alias-router.
(i tried to start exim with -d+all+lookup+route+transport -v to find
out what is going on, but
i did not see much additional info ?! )

till yesterday i used telnet to test with correct mail-from , but
today i discovered mail
( echo "msg" | mail -s "subject" rcpt )
and wrong sender-address (host.wrong-domain) is not accepted by smarthost.
i could have used '-r sender' and i red that MUA is responsable for
correct sender, but when messages are send locally, then the local
domain yyy is good enough (xxx does work, too, cause 'domainlist
local_domains = xxx : yyy', probably the most simple solution, to
tells MUAs to use the official xxx ?! )

why host is in domain (sometimes ?) ?
when there is someone thinking rewrite is devel (i red about), there
must be a better solution ?
(if you think about another question, please answer that, too. i am
rather unexperienced with exim and mail at all and need every hint )

thanks a lot in advance
andreas