[Exim] $host and CNAME

Pàgina inicial
Delete this message
Reply to this message
Autor: Andreas Metzler
Data:  
A: exim-users
Assumpte: [Exim] $host and CNAME
Hello,
I have problems with using $host in a lsearch lookup.

remote_smtp:
driver = smtp
hosts_try_auth = ${if exists {CONFDIR/passwd.client}{DCsmarthost}{}}

smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * DCsmarthost
host_find_failed = defer
same_domain_copy_routing = yes
no_more

And the authenticators use:
${lookup{$host}lsearch*{CONFDIR/passwd.client}
to get the authentication data form the file with format
host:login:password

This usually works well, but fails if DCsmarthost is no A record but
a CNAME. - Then $host does not contain the original value (CNAME) but
the A record it points to and the lookup fails because the user has
entered the cname in passwd.client.

I do not want to use the macro DCsmarthost instead of $host because
it would do away with the main reason for putt ing the password in a
separate file - allowing smtp auth to multiple smarthosts.

Is the cname availble in a regular exim expansion variable?
               cu andreas
PS: http://bugs.debian.org/244724
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"