Re: [exim] Relaying by email address

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tony Finch
Datum:  
To: Gareth.Segree
CC: 'Exim-users'
Betreff: Re: [exim] Relaying by email address
On Tue, 16 Aug 2005 Gareth.Segree@??? wrote:
>
> My internet domain is gleanerjm.com and I want incoming mail to specific
> email addresses from gleanerjm.com to be relayed to
> gleanerjm.gleanerco.net.com and the headers rewritten to say
> gleanerjm.gleanerco.net.com


It would be much better if your internal email domain was the same as your
externally-visible domain. Doing email routing by rewriting is liable to
cause problems.

If you have to maintain this mixture of domains, then a more Exim-like way
would be to use a redirect router to direct email to your Domino server's
domain. This won't cause any rewriting of addresses in the header of the
message.

> begin rewrite
> # This line changes outgoing mail to mail.com)
> *@gleanerjm.gleanerco.net "$local_part@???" bctfrF
>
> # This line should change incoming mail to certain users to
> gleanerjm.gleanerco.net.com
> *@gleanerjm.com ${lookup{$local_part}lsearch{/etc/mail/domino-users}\
>                 {$value}fail}$local_part@??? bctfrF


Your problem is that you aren't rewriting envelope recipient addresses.
You also aren't distinguishing between incoming and outgoing email in your
rewrite rules, so there's nothing to ensure that what you have specified
in the comments will occur. Note also that you have specified a rewrite
loop because the result of one rewrite rule will be rewritten by the other
rewrite rule.

You probably want to use the flags Ehq, though that is probably not enough
to fix the problem properly.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}