[afnog] Exim cannot send mail to external email address

AFAHOUNKO Danny afahounko at gmail.com
Fri May 21 10:33:06 UTC 2010


 >MySQL query: SELECT dest FROM aliases WHERE
 >email='ppomary at update.ug.edu.gh' AND type="site"

Hi,
verify that you have 'ppomary at update.ug.edu.gh' in your 'aliases' table 
and the record matches with 'site' in type field.

In your exim configuration file replace the double-quote with single 
quote in your sql queries definitions.


mysql_sys_aliases:
   ...
   data = ${lookup mysql{SELECT dest FROM aliases \
             WHERE email='${local_part}@${table}' AND \
             type='system'}}

mysql_aliases:
   ...
   data = ${lookup mysql{ SELECT dest FROM aliases \
             WHERE email='${local_part}@${table}' AND \
             type='site'}}




On 05/21/2010 09:46 AM, Pamela Pomary wrote:
>
>> hi ! could u please attach the structure of your mysql tables ?!
>>
>> show us the output of :
>>
>> exim -d -bt me at ug.edu.gh
>>
>
> mysql user's domain is update.ug.edu.gh. the output however is for a user
> ppomary at update.ug.edu.gh in the mysql database. the domain ug.edu.gh is
> the other domain i was trying to send the mail to when i encountered the
> error ppomary at ug.edu.gh: Unrouteable address
>
> Exim version 4.71 (FreeBSD 8.0) uid=0 gid=0 pid=3466 D=fbb95cfd
> Probably Berkeley DB version 1.8x (native mode)
> Support for: crypteq iconv() IPv6 use_setclassresources PAM Perl
> Expand_dlfunc OpenSSL Content_Scanning DKIM Old_Demime
> Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb
> dsearch mysql nis nis0 passwd
> Authenticators: cram_md5 dovecot plaintext spa
> Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> Fixed never_users: 0
> Size of off_t: 8
> OpenSSL compile-time version: OpenSSL 0.9.8k 25 Mar 2009
> OpenSSL runtime version: OpenSSL 0.9.8k 25 Mar 2009
> changed uid/gid: forcing real = effective
>    uid=0 gid=0 pid=3466
>    auxiliary group list: 0
> seeking password data for user "root": cache not available
> getpwnam() succeeded uid=0 gid=0
> configuration file is /usr/local/etc/exim/configure
> log selectors = 00000ffc 00212001
> trusted user
> admin user
> originator: uid=0 gid=0 login=root name=Charlie Root
> sender address = root at update.ug.edu.gh
> Address testing: uid=0 gid=6 euid=0 egid=6
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Testing ppomary at update.ug.edu.gh
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Considering ppomary at update.ug.edu.gh
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> routing ppomary at update.ug.edu.gh
> -------->  dnslookup router<--------
> local_part=ppomary domain=update.ug.edu.gh
> checking domains
> search_open: mysql "NULL"
> search_find: file="NULL"
>    key="SELECT domain FROM domains WHERE domain="update.ug.edu.gh" "
> partial=-1 affix=NULL starflags=0
> LRU list:
> internal_search_find: file="NULL"
>    type=mysql key="SELECT domain FROM domains WHERE
> domain="update.ug.edu.gh" "
> database lookup required for SELECT domain FROM domains WHERE
> domain="update.ug.edu.gh"
> MySQL query: SELECT domain FROM domains WHERE domain="update.ug.edu.gh"
> MYSQL new connection: host=localhost port=0 socket=NULL database=student
> user=stud
> lookup yielded: update.ug.edu.gh
> update.ug.edu.gh in "@ :localhost : update.ug.edu.gh"? yes (matched "@")
> update.ug.edu.gh in "! +local_domains"? no (matched "! +local_domains")
> dnslookup router skipped: domains mismatch
> -------->  mysql_sys_aliases router<--------
> local_part=ppomary domain=update.ug.edu.gh
> calling mysql_sys_aliases router
> rda_interpret (string): ${lookup mysql{SELECT dest FROM aliases WHERE
> email='${local_part}@${domain}' AND type="system"}}
> search_open: mysql "NULL"
>    cached open
> search_find: file="NULL"
>    key="SELECT dest FROM aliases WHERE email='ppomary at update.ug.edu.gh' AND
> type="system"" partial=-1 affix=NULL starflags=0
> LRU list:
> internal_search_find: file="NULL"
>    type=mysql key="SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="system""
> database lookup required for SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="system"
> MySQL query: SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="system"
> MYSQL using cached connection for localhost/******/******
> MYSQL: no data found
> lookup failed
> expanded:
> file is not a filter file
> parse_forward_list:
> mysql_sys_aliases router declined for ppomary at update.ug.edu.gh
> -------->  mysql_aliases router<--------
> local_part=ppomary domain=update.ug.edu.gh
> calling mysql_aliases router
> rda_interpret (string): ${lookup mysql{ SELECT dest FROM aliases WHERE
> email='${local_part}@${domain}' AND type="site"}}
> search_open: mysql "NULL"
>    cached open
> search_find: file="NULL"
>    key="SELECT dest FROM aliases WHERE email='ppomary at update.ug.edu.gh' AND
> type="site"" partial=-1 affix=NULL starflags=0
> LRU list:
> internal_search_find: file="NULL"
>    type=mysql key="SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="site""
> database lookup required for SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="site"
> MySQL query: SELECT dest FROM aliases WHERE
> email='ppomary at update.ug.edu.gh' AND type="site"
> MYSQL using cached connection for localhost/****/****
> MYSQL: no data found
> lookup failed
> expanded:
> file is not a filter file
> parse_forward_list:
> mysql_aliases router declined for ppomary at update.ug.edu.gh
> -------->  mysql_user router<--------
> local_part=ppomary domain=update.ug.edu.gh
> checking "condition"
> search_open: mysql "NULL"
>    cached open
> search_find: file="NULL"
>    key="SELECT home FROM passwd WHERE email='ppomary at update.ug.edu.gh'"
> partial=-1 affix=NULL starflags=0
> LRU list:
> internal_search_find: file="NULL"
>    type=mysql key="SELECT home FROM passwd WHERE
> email='ppomary at update.ug.edu.gh'"
> database lookup required for SELECT home FROM passwd WHERE
> email='ppomary at update.ug.edu.gh'
> MySQL query: SELECT home FROM passwd WHERE email='ppomary at update.ug.edu.gh'
> MYSQL using cached connection for localhost/****/****
> lookup yielded: /usr/local/vdomains/update.ug.edu.gh/users/ppomary/
> calling mysql_user router
> mysql_user router called for ppomary at update.ug.edu.gh
>    domain = update.ug.edu.gh
> set transport mysql_delivery
> queued for mysql_delivery transport: local_part = ppomary
> domain = update.ug.edu.gh
>    errors_to=NULL
>    domain_data=NULL localpart_data=NULL
> routed by mysql_user router
>    envelope to: ppomary at update.ug.edu.gh
>    transport: mysql_delivery
> search_tidyup called
> close MYSQL connection: localhost/****/****
>>>>>>>>>>>>>>>>> Exim pid=3466 terminating with rc=0>>>>>>>>>>>>>>>>
>
>>
>> --
>> AFAHOUNKO Danny
>> Administrateur Réseaux&  Système d'Information - CICA-RE
>> Red Hat Certified Engineer - RHCE
>> Gsm: +228 914.55.89 / +228 953.54.50
>> Tel: +228 223.62.62
>>
>
>

-- 
AFAHOUNKO Danny
Administrateur Réseaux & Système d'Information - CICA-RE
Red Hat Certified Engineer - RHCE
Gsm: +228 914.55.89 / +228 953.54.50
Tel: +228 223.62.62



More information about the afnog mailing list