[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tpop3d-discuss]auth_mysql column with address@hidden
From: |
Jim Flowers |
Subject: |
[tpop3d-discuss]auth_mysql column with address@hidden |
Date: |
Sat, 8 Oct 2005 00:31:23 -0400 |
I have been able to set up my tpop3d server to access virtual email boxes from
a mysql database derived from other mail programs. In order to do this, I use
the following template:
listen-address: ###.###.###.###:110(domain.tld)
...
append-domain: true
...
auth-mysql-pass-query: SELECT CONCAT('/usr/local/virtual/', mailbox.maildir),
CONCAT('{crypt_md5}', mailbox.password), 'www', 'bsd'
FROM mailbox, domain WHERE mailbox.username = '$(user)'
AND mailbox.domain = domain.domain;
to accommodate different tables, columns and data formats.
In particular, the < FROM mailbox, domain WHERE mailbox.username = '$(user)' >
clause is required because in the mailbox table, the username column data
format is 'address@hidden'.
So far so good. As long as the client provides 'address@hidden'
everything works as expected.
Now I want it to work when the client just enters 'username', with the domain
identified by the server address. The internal variable $(domain) is
correctly set to 'domain.tld' via the listen definition but the $(user)
internal variable remains 'username' and the mysql lookup fails. As
configured, append-domain does not have the desired affect.
Apparently, I need a different variable or to be able to concatenate
'$(username)@$(domain)' in order to perform the mysql lookup.
Can this be done with the template in apop3d.conf?
If not, I suppose the only solution will be to use mysql string functions in
the SELECT statement to obtain separate values for the local_part and
domain_name columns to allow the append-domain routine to solve the problem.
Thanks for any suggestions.
--
Jim Flowers<address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [tpop3d-discuss]auth_mysql column with address@hidden,
Jim Flowers <=