10 Apr
2012
10 Apr
'12
7:12 p.m.
2012/4/10 Timo Sirainen tss@iki.fi
As it says, currently they aren't supported. It would need some extra code. Depending on your passdb you may be able to do this in your passdb configuration.
Currently I'm using dovecot 1.x on my production server with mysql passdb. I have ugly SQL queries to do this and my idea was to upgrade to dovecot 2.x to avoid this.
password_query = SELECT mbox AS user , passwd as password FROM mbox WHERE mbox=IF('%s' = 'smtp', '%u', IF('%u' like '%%@%%', '%u', concat('%u', case '%l' WHEN '10.0.0.1' THEN '@domain1.com' WHEN '10.0.0.2' THEN '@domain2.com' WHEN '10.0.0.3' THEN '@domain3.com' END ) ) ) AND passwd IS NOT NULL AND (status='active' OR status ='inactive');
-- Stephane Locatelli