Re: [exim] rule in rewrite section

Top Page
Delete this message
Reply to this message
Author: Ian Eiloart
Date:  
To: andreas graeper
CC: <exim-users@exim.org>
Subject: Re: [exim] rule in rewrite section

On 8 Jan 2013, at 21:50, andreas graeper <agraeper@???>
wrote:

> 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.


You haven't copied this literally, have you? I can tell, because there's an incorrect bracket in the first rule.

Please copy it literally, with the correct domains. The information could be relevant, so it's best not to obscure it.

You can check your log files to see if rewrite rules are used. But, you'll probably need to specify that they should be logged with "log_selector = +address_rewrite"

> 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

Spelling tips: "read" "responsible". Also, please start your sentences with a capital letter: it makes your message easier to read.

> 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 ?) ?


That probably depends on the nature of the sending client. Some may not be fixable. It's probably worth looking to see whether you can eliminate, or at least understand this.

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


--
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148