[Exim] mysql lookup in exim

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrew D
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] mysql lookup in exim
Hi there, got exim running on suse 6.2 running exim 3.33 with mysql binary
3.23.43

got a strange problem with exim and mysql.
I am getting a match within exim from a mysql query that should be no match.
segment of my config is at the bottom as well as the mysql lookups
sorry for the length, I snipped as much as possible.
btw if you could reply using awd@??? (reply to all) as well as the
list that would be great as I am only receiving digests.
Thanx in Advance.

exim -bv -d9 awd@???

--snipped--
MYSQL query: select distinct domain from domains where dom_type='F'
MYSQL using cached connection for **/**/**/**
lookup yielded: dux.au.com
dux.au.com in "mysql;select distinct domain from domains where
dom_type='F'"? yes (matched mysql;select distinct domain from domains where
dom_type='F')
--snip--
matched as expected. cool

--snipped--
virtual_alias director declined for awd: MYSQL: no data found
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="select distinct domain from domains where dom_type='P'" partial=-1
LRU list:
7/usr/exim/virtual/fulldomains
End
internal_search_find: file="NULL"
type=mysql key="select distinct domain from domains where dom_type='P'"
database lookup required for select distinct domain from domains where
dom_type='P'
MYSQL query: select distinct domain from domains where dom_type='P'
MYSQL using cached connection for **/**/**/**
lookup yielded: frozen.com
dux.au.com in "mysql;select distinct domain from domains where
dom_type='P'"? yes (matched mysql;select distinct domain from domains where
dom_type='P')
--snip--
this is where I get confused as dux.au.com isn't in the list of domains that
the lookup yielded but it says that it is a match. This obviously keeps it
going through the director til it fails because the lookup fails :(

--snipped--
expansion of "${lookup mysql{select new_add from ${sg{$domain}{\\.}{_}}
where user='all'}{$value}fail}" failed: "lookup" failed and "fail"
requested: MYSQL: no data found
virtual_pop director declined for awd
awd@??? failed to verify:
unknown local-part "awd" in domain "dux.au.com"
search_tidyup called

--snip--

from my configure file
#directors

# these directors are for virtual email
virtual_alias:
driver = aliasfile
domains = mysql;select distinct domain from domains where dom_type='F'
search_type = mysql
query = select new_add from ${sg{$domain}{\\.}{_}} where
user='$local_part' and type='1'
qualify_preserve_domain

virtual_pop:
driver = smartuser
domains = mysql;select distinct domain from domains where dom_type='P'
new_address = ${lookup mysql{select new_add from ${sg{$domain}{\\.}{_}}
where user='all'}{$value}fail}
no_more

virtual_localuser:
driver = aliasfile
transport = virtual_localdelivery
domains = mysql;select distinct domain from domains where dom_type='F'
query = mysql;select user from ${sg{$domain}{\\.}{_}} where
user='$local_part'
search_type = mysql
no_more

--snip--

from mysql server

mysql> select distinct domain from domains where dom_type='F';
+------------+
| domain     |

+------------+
| dux.au.com |

+------------+

mysql> select distinct domain from domains where dom_type='P';
+------------+
| domain     |

+------------+
| frozen.com |

+------------+


If the email address is whatever@??? it goes through the pop domain
fine(but fails because it points to awd@??? )

any thoughts most welcome.
cya
Andrew

PS as a side note I accidently sent this email through the server I am
setting this up on and I got this

enterprise:/usr/exim # sendmail -bv -d9 exim-user@???
-snip-
database lookup required for select distinct domain from domains
MYSQL query: select distinct domain from domains
MYSQL new connection: host=** port=0 database=** user=** password=**
lookup yielded: dux.au.com
frozen.com
exim.org in local_domains? yes (matched mysql;select distinct domain from
domains)
exim.org in percent_hack_domains? no (end of list)
address exim-user@???
local_part=exim-user domain=exim.org
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

directing exim-user@???
--snip--

starting to wonder if I have done something wrong.




--
The human race has one really effective weapon, and that is laughter.