[exim] Exim4 relay unknown users in local domain to alternat…

Top Page
Delete this message
Reply to this message
Author: Andre Turpin
Date:  
To: exim-users
Subject: [exim] Exim4 relay unknown users in local domain to alternate IP not working
Howdy all...

I'm wanting exim to relay unknown user (local parts) in local domains
(+local_domains) to my backup server, and I've created this router to
try...

relay_to_old_server:
driver = manualroute
domains = +local_domains
condition = !${lookup mysql{select users.username where
username='$local_part@$domain'}}
transport = remote_smtp
route_list = * my.old.server.ip

Which produces the following in my logs...
2005-10-22 10:27:35 1ETMDV-0002Qs-NH == me@???
R=relay_to_old_server defer (-1): condition check lookup defer

I have a feeling that condition statement I put in the
relay_to_old_server router isn't correct, or isn't the correct approach
for this. Essentially with that router, I want it to check if user is
in local domains, then if they do not exist locally I'd like to relay
them to the alternate server (but if they are known locally, they
should be delivered locally).

Just a note, I've altered the ACL entry...
accept domains = +local_domains
# endpass
# verify = recipient

so that unknown recipients in local domains don't get bounced...


Some output from # exim4 -bV
=========================
Exim version 4.52 #1 built 21-Aug-2005 09:48:23
Support for: iconv() IPv6 PAM Perl GnuTLS Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb
dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram
redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Configuration file is /etc/exim4/exim4.conf


Thanks for any help!!