Re: [exim] Problem with MAIL FROM setting

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Drav Sloan
Datum:  
To: Aran Dunkley
CC: exim-users
Betreff: Re: [exim] Problem with MAIL FROM setting
Aran Dunkley wrote:
> Hi,
>
> I have a problem where the mail sent by my Exim4 to some addresses fails
> due to the MAIL FROM address being incorrect and failing reverse lookup.
> For example:
>
> SMTP error from remote mail server after
> MAIL FROM:<www-data@???>
>
> I have set in my /etc/hosts file for the domain to be the proper domain
> and can't find any setting in exim config where it's set wrongly, does
> anyone know how I can get rid of this phx.dedicated.codero.com out of
> the system?


A my present workplace I inherited a load of hosts with stupid domain
names, or subdomains that didn't exist in DNS. When replacing the mail
server I found these and got around it by doing rewrites.

In the rewrite section I had:

begin rewrite

# rewrite domains over to our "core three" domains
#
*@nwildlsearch;EximTables/rewrite_domains "$local_part@${lookup{${lc:$domain}}nwildlsearch{EximTables/rewrite_domains}{$value}fail}" T
*@lsearch;EximTables/rewrite_domains "$1@${lookup{${lc:$domain}}lsearch{EximTables/rewrite_domains}{$value}fail}" T

the rewrite_domains has entries of two forms

*.domain.com                           domain.com
long.unqualified.non-dns-existant.lan  domain.com


This would rewrite the Envelope To from fred@??? to fred@??? and
also fred@??? to fred@???.

On the rewrite rules replace the T flag with F and this should rewrite
the Envelope Sender to something more "routable" (applying the same
rewrites as exampled above).

Maybe this is another way to solve your issue!

Regards

D.