Hi Mike,
>
> the string that you need to look at is this
>
> "${lookup mysql{select users.uid from users,domains where localpart =
>> '${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and
>> users.domain_id = domains.domain_id}}"
>
>
> if you are familiar with sql, get the sql part of this statement, replace
> the variables with real items and run it in your sql server
>
> select users.uid from users,domains where localpart = 'user' and domain = '
> domain.com' and users.domain_id = domains.domain_id
I didn't find that string, only in the exim4.conf in virtual_delivery.
Here is the output you wanted
~# exim -d -bt frizze@???
Exim version 4.63 uid=0 gid=0 pid=18749 D=fbb95cfd
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages
Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb
dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram
redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
changed uid/gid: forcing real = effective
uid=0 gid=0 pid=18749
auxiliary group list: <none>
seeking password data for user "vmail": cache not available
getpwnam() succeeded uid=99 gid=99
seeking password data for user "www-data": cache not available
getpwnam() succeeded uid=33 gid=33
seeking password data for user "Debian-exim": cache not available
getpwnam() succeeded uid=102 gid=102
seeking password data for user "root": cache not available
getpwnam() succeeded uid=0 gid=0
configuration file is /etc/exim4/exim4.conf
log selectors = 00000ffc 001a9001
trusted user
admin user
seeking password data for user "Debian-exim": cache not available
getpwnam() succeeded uid=102 gid=102
seeking password data for user "list": cache not available
getpwnam() succeeded uid=38 gid=38
originator: uid=0 gid=0 login=root name=Martin Justra
sender address = root@???
Address testing: uid=0 gid=102 euid=0 egid=102
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing frizze@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering frizze@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing frizze@???
--------> dnslookup router <--------
local_part=frizze domain=harfouche.de
checking domains
search_open: mysql "NULL"
search_find: file="NULL"
key="SELECT DISTINCT domain FROM domains WHERE type = 'local' AND
enabled = '1' AND domain = 'harfouche.de'" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="SELECT DISTINCT domain FROM domains WHERE type =
'local' AND enabled = '1' AND domain = 'harfouche.de'"
database lookup required for SELECT DISTINCT domain FROM domains WHERE
type = 'local' AND enabled = '1' AND domain = 'harfouche.de'
MYSQL query: SELECT DISTINCT domain FROM domains WHERE type = 'local'
AND enabled = '1' AND domain = 'harfouche.de'
MYSQL new connection: host=localhost port=0
socket=/var/run/mysqld/mysqld.sock database=vexim user=vexim
lookup yielded: harfouche.de
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="SELECT DISTINCT alias FROM domainalias WHERE alias =
'harfouche.de'" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="SELECT DISTINCT alias FROM domainalias WHERE alias =
'harfouche.de'"
database lookup required for SELECT DISTINCT alias FROM domainalias
WHERE alias = 'harfouche.de'
MYSQL query: SELECT DISTINCT alias FROM domainalias WHERE alias =
'harfouche.de'
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
harfouche.de in "@ : harfouche.de : "? yes (matched "harfouche.de")
harfouche.de in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> mailman_router router <--------
local_part=frizze domain=harfouche.de
checking require_files
file check: /usr/lib/mailman/lists/$local_part/config.pck
expanded file: /usr/lib/mailman/lists/frizze/config.pck
stat() yielded -1
errno = 2
mailman_router router skipped: file check
--------> ditch_maxmsgsize router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select users.maxmsgsize from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and users.maxmsgsize > 0 and
users.domain_id=domains.domain_id " partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select users.maxmsgsize from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and users.maxmsgsize >
0 and users.domain_id=domains.domain_id "
database lookup required for select users.maxmsgsize from users,domains
where localpart = 'frizze' and domain = 'harfouche.de' and
users.maxmsgsize > 0 and users.domain_id=domains.domain_id
MYSQL query: select users.maxmsgsize from users,domains where localpart
= 'frizze' and domain = 'harfouche.de' and users.maxmsgsize > 0 and
users.domain_id=domains.domain_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
ditch_maxmsgsize router skipped: condition failure
--------> ditch_malware router <--------
local_part=frizze domain=harfouche.de
checking "condition"
ditch_malware router skipped: condition failure
--------> ditch_spam_drop router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select users.sa_refuse * 10 from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and users.on_spamassassin = '1' and
users.movedelete = '2' and users.domain_id=domains.domain_id and
users.sa_refuse > 0 " partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select users.sa_refuse * 10 from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '2' and
users.domain_id=domains.domain_id and users.sa_refuse > 0 "
database lookup required for select users.sa_refuse * 10 from
users,domains where localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '2' and
users.domain_id=domains.domain_id and users.sa_refuse > 0
MYSQL query: select users.sa_refuse * 10 from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '2' and
users.domain_id=domains.domain_id and users.sa_refuse > 0
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
ditch_spam_drop router skipped: condition failure
--------> ditch_spam_movetojunk router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select users.sa_refuse * 10 from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and users.on_spamassassin = '1' and
users.movedelete = '1' and users.on_forward = '0' and users.type =
'local' and users.domain_id=domains.domain_id and users.sa_refuse > 0 "
partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select users.sa_refuse * 10 from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '1' and
users.on_forward = '0' and users.type = 'local' and
users.domain_id=domains.domain_id and users.sa_refuse > 0 "
database lookup required for select users.sa_refuse * 10 from
users,domains where localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '1' and
users.on_forward = '0' and users.type = 'local' and
users.domain_id=domains.domain_id and users.sa_refuse > 0
MYSQL query: select users.sa_refuse * 10 from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and
users.on_spamassassin = '1' and users.movedelete = '1' and
users.on_forward = '0' and users.type = 'local' and
users.domain_id=domains.domain_id and users.sa_refuse > 0
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
ditch_spam_movetojunk router skipped: condition failure
--------> ditch_hdrmailer router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'x-mailer' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and
users.user_id=blocklists.user_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'x-mailer' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id"
database lookup required for select count(*) from
blocklists,users,domains where blocklists.blockhdr = 'x-mailer' and
blocklists.blockval = '' and users.localpart = 'frizze' and
domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL query: select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'x-mailer' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
lookup yielded: 0
ditch_hdrmailer router skipped: condition failure
--------> ditch_hdrto router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'to' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and
users.user_id=blocklists.user_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'to' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id"
database lookup required for select count(*) from
blocklists,users,domains where blocklists.blockhdr = 'to' and
blocklists.blockval = '' and users.localpart = 'frizze' and
domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL query: select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'to' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
lookup yielded: 0
ditch_hdrto router skipped: condition failure
--------> ditch_hdrfrom router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'from' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and
users.user_id=blocklists.user_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'from' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id"
database lookup required for select count(*) from
blocklists,users,domains where blocklists.blockhdr = 'from' and
blocklists.blockval = '' and users.localpart = 'frizze' and
domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL query: select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'from' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
lookup yielded: 0
ditch_hdrfrom router skipped: condition failure
--------> ditch_hdrsubject router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'subject' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and
users.user_id=blocklists.user_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'subject' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id"
database lookup required for select count(*) from
blocklists,users,domains where blocklists.blockhdr = 'subject' and
blocklists.blockval = '' and users.localpart = 'frizze' and
domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL query: select count(*) from blocklists,users,domains where
blocklists.blockhdr = 'subject' and blocklists.blockval = '' and
users.localpart = 'frizze' and domains.domain = 'harfouche.de' and
domains.domain_id=blocklists.domain_id and users.user_id=blocklists.user_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
lookup yielded: 0
ditch_hdrsubject router skipped: condition failure
--------> virtual_vacation router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select users.on_vacation from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and users.on_vacation = '1' and
users.domain_id=domains.domain_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select users.on_vacation from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and users.on_vacation =
'1' and users.domain_id=domains.domain_id"
database lookup required for select users.on_vacation from users,domains
where localpart = 'frizze' and domain = 'harfouche.de' and
users.on_vacation = '1' and users.domain_id=domains.domain_id
MYSQL query: select users.on_vacation from users,domains where localpart
= 'frizze' and domain = 'harfouche.de' and users.on_vacation = '1' and
users.domain_id=domains.domain_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
virtual_vacation router skipped: condition failure
--------> virtual_forward router <--------
local_part=frizze domain=harfouche.de
checking "condition"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select users.on_forward from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and users.on_forward = '1' and
users.domain_id=domains.domain_id" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select users.on_forward from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and users.on_forward =
'1' and users.domain_id=domains.domain_id"
database lookup required for select users.on_forward from users,domains
where localpart = 'frizze' and domain = 'harfouche.de' and
users.on_forward = '1' and users.domain_id=domains.domain_id
MYSQL query: select users.on_forward from users,domains where localpart
= 'frizze' and domain = 'harfouche.de' and users.on_forward = '1' and
users.domain_id=domains.domain_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
virtual_forward router skipped: condition failure
--------> virtual_domains router <--------
local_part=frizze domain=harfouche.de
calling virtual_domains router
rda_interpret (string): ${lookup mysql{select smtp from users,domains
where localpart = '${quote_mysql:$local_part}' and domain =
'${quote_mysql:$domain}' and domains.enabled = '1' and users.enabled =
'1' and users.domain_id = domains.domain_id}}
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select smtp from users,domains where localpart = 'frizze' and
domain = 'harfouche.de' and domains.enabled = '1' and users.enabled =
'1' and users.domain_id = domains.domain_id" partial=-1 affix=NULL
starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select smtp from users,domains where localpart =
'frizze' and domain = 'harfouche.de' and domains.enabled = '1' and
users.enabled = '1' and users.domain_id = domains.domain_id"
database lookup required for select smtp from users,domains where
localpart = 'frizze' and domain = 'harfouche.de' and domains.enabled =
'1' and users.enabled = '1' and users.domain_id = domains.domain_id
MYSQL query: select smtp from users,domains where localpart = 'frizze'
and domain = 'harfouche.de' and domains.enabled = '1' and users.enabled
= '1' and users.domain_id = domains.domain_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
expanded:
file is not a filter file
parse_forward_list:
virtual_domains router declined for frizze@???
--------> virtual_dom_groups router <--------
local_part=frizze domain=harfouche.de
checking senders
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select g.is_public from groups g, domains d where d.enabled =
'1' and d.domain = 'harfouche.de' and d.domain_id =
g.domain_id and g.enabled = '1' and g.name = 'frizze'"
partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select g.is_public from groups g, domains d where
d.enabled = '1' and d.domain = 'harfouche.de' and
d.domain_id = g.domain_id and g.enabled = '1' and g.name
= 'frizze'"
database lookup required for select g.is_public from groups g, domains d
where d.enabled = '1' and d.domain = 'harfouche.de' and
d.domain_id = g.domain_id and g.enabled = '1' and g.name
= 'frizze'
MYSQL query: select g.is_public from groups g, domains d where d.enabled
= '1' and d.domain = 'harfouche.de' and d.domain_id =
g.domain_id and g.enabled = '1' and g.name = 'frizze'
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select u.username from domains d, groups g, group_contents c,
users u where d.enabled = '1' and d.domain =
'harfouche.de' and d.domain_id = g.domain_id and g.name =
'frizze' and g.enabled = '1' and g.is_public = 'N'
and c.member_id = u.user_id and d.domain_id = u.domain_id
and u.enabled = '1' and u.username =
'root@???' " partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select u.username from domains d, groups g,
group_contents c, users u where d.enabled = '1' and
d.domain = 'harfouche.de' and d.domain_id = g.domain_id and
g.name = 'frizze' and g.enabled = '1' and g.is_public
= 'N' and c.member_id = u.user_id and d.domain_id =
u.domain_id and u.enabled = '1' and u.username =
'root@???' "
database lookup required for select u.username from domains d, groups g,
group_contents c, users u where d.enabled = '1' and
d.domain = 'harfouche.de' and d.domain_id = g.domain_id and
g.name = 'frizze' and g.enabled = '1' and g.is_public
= 'N' and c.member_id = u.user_id and d.domain_id =
u.domain_id and u.enabled = '1' and u.username =
'root@???'
MYSQL query: select u.username from domains d, groups g, group_contents
c, users u where d.enabled = '1' and d.domain =
'harfouche.de' and d.domain_id = g.domain_id and g.name =
'frizze' and g.enabled = '1' and g.is_public = 'N'
and c.member_id = u.user_id and d.domain_id = u.domain_id
and u.enabled = '1' and u.username =
'root@???'
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
MYSQL: no data found
lookup failed
root@??? in " "? no (end of list)
virtual_dom_groups router skipped: senders mismatch
--------> virtual_domains_catchall router <--------
local_part=frizze domain=harfouche.de
calling virtual_domains_catchall router
rda_interpret (string): ${lookup mysql{select smtp from users,domains
where localpart = '*' and domain = '${quote_mysql:$domain}' and
users.domain_id = domains.domain_id}}
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select smtp from users,domains where localpart = '*' and domain =
'harfouche.de' and users.domain_id = domains.domain_id" partial=-1
affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=mysql key="select smtp from users,domains where localpart = '*'
and domain = 'harfouche.de' and users.domain_id = domains.domain_id"
database lookup required for select smtp from users,domains where
localpart = '*' and domain = 'harfouche.de' and users.domain_id =
domains.domain_id
MYSQL query: select smtp from users,domains where localpart = '*' and
domain = 'harfouche.de' and users.domain_id = domains.domain_id
MYSQL using cached connection for
localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
lookup yielded: /var/opt/vmail/harfouche.de/*/Maildir
expanded: /var/opt/vmail/harfouche.de/*/Maildir
file is not a filter file
parse_forward_list: /var/opt/vmail/harfouche.de/*/Maildir
extract item: /var/opt/vmail/harfouche.de/*/Maildir
set transport virtual_delivery
virtual_domains_catchall router generated
/var/opt/vmail/harfouche.de/*/Maildir
pipe, file, or autoreply
errors_to=NULL transport=virtual_delivery
uid=unset gid=unset home=NULL
routed by virtual_domains_catchall router
envelope to: frizze@???
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering /var/opt/vmail/harfouche.de/*/Maildir
frizze@??? -> /var/opt/vmail/harfouche.de/*/Maildir
transport = virtual_delivery
search_tidyup called
close MYSQL connection: localhost:(/var/run/mysqld/mysqld.sock)/vexim/vexim
>>>>>>>>>>>>>>>> Exim pid=18749 terminating with rc=0 >>>>>>>>>>>>>>>>
Thanks,
Martin