Sorry, now that I reread the comment for listen I see it says space separated list. I'm not sure this is clear to everyone that it can be used to listen on multiple ports as there are wiki pages showing how to use iptables to get additional ports: http://wiki.dovecot.org/Iptables
The patch worked for %a perfectly. I also had to start returning nopassword in my passdb query, but I am now up and working. Now I just have to do some testing on 1.1 to make sure I am comfortable running it in production over 1.0.10 which I currently have.
If anyone cares here is my query.. it is a little complex because I use it to lookup against two tables and use the first match : a table called proxymap to proxy the user offsite if they havent been migrated yet, and a @mail sql user db if the user is local. the union makes it so all I have to do is delete the user from proxymap when they are migrated and they stop proxying.
#proxymap and atmail query (if entry is in proxy map it wins out over atmail tables) password_query = SELECT '3000' AS userdb_uid, '3000' AS userdb_gid, proxymap.user AS user, NULL as password, host, 'Y' as proxy, 'Y' as nologin, 'Y' as nodelay, 'Y' as nopassword, NULL as userdb_home, NULL as quota from proxymap where proxymap.user = IF(INSTR('%u','@')=0,CONCAT('%u','@',(select domain from portdomainmap where port='%a')),'%u') UNION SELECT '3000' AS userdb_uid, '3000' AS userdb_gid, UserSession.Account AS user, MD5(UserSession.Password) AS password, NULL as host, NULL as proxy, NULL as nologin, NULL as nodelay, NULL as nopassword, Users.Maildir as userdb_home, CONCAT('maildir:storage=',Users.UserQuota) as userdb_quota FROM Users,UserSession where UserSession.Account = Users.Account and UserSession.Account = IF(INSTR('%u','@')=0,CONCAT('%u','@',(select domain from portdomainmap where port='%a')),'%u') limit 1;
#atmail compatible query for delivery agent user_query = SELECT '3000' AS uid, '3000' AS gid, Users.Maildir as home FROM Users,UserSession where UserSession.Account = Users.Account and UserSession.Account = '%u'
On Feb 4, 2008 11:54 AM, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2008-02-04 at 11:40 -0500, Eric Hester wrote:
Any chance of getting multiple ports per protocol in 1.1 or is that a major undertaking?
It should already work:
listen = *:143 *:144 *:145