Re: [exim] how to handle hostnames in domains (domain_list c…

Top Page
Delete this message
Reply to this message
Author: Drav Sloan
Date:  
To: Hubertus von Fürstenberg
CC: exim-users
Subject: Re: [exim] how to handle hostnames in domains (domain_list comes from ldap)
Hubertus von Fürstenberg wrote:
> I could transform the list of domains that I get from LDAP to
> *.domain : *.otherdomain : etc


This is pretty much what I do our the mail server for the company I work for.

In the exim rewrite configuration

*@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

Where EximTables is a macro pointing to my "table files" directory and the
rewrite_domains file contains entries like:

hostname.example.com: example.com
*.example.com: example.com

So I can do either individual "hostname" rewrites, or wildcard
rewrites. Note that the T flag only does this on the Envelope TO and
not on things like headers.

Regards

D.