[Dovecot] Re: One dovecot, multiple domains

Daniel Watts d at nielwatts.com
Wed Mar 22 20:15:18 EET 2006


Ben wrote:
> Hey guys, I've got dovecot configured to work perfectly for virtual 
> users across different domains. It's great.
> 
> My problem is that, as far as I can tell, dovecot makes me use one SSL 
> certificate across all my domains. That's not what I want. Is there a 
> way I can get dovecot to use the cert for mail.foo.com when somebody is 
> logging into a foo.com account, and the cert for mail.bar.com when 
> somebody is logging into a bar.com account?
> 
> Am I missing something obvious, or asking the impoosible?
> 


Ben did you fix this one?

I've traced the problem through my mail logs:

Mar 22 18:16:43 tg1 dovecot: auth(default): client in: AUTH     1 
PLAIN   service=IMAP    lip=xxx.xxx.35.122       rip=xxx.xxx.32.85 
resp=AGRhbkBhbHVtaW5hdGkubmV0AHBhc3Mx
Mar 22 18:16:43 tg1 dovecot: auth-worker(default): 
sql(dan at domain.net,xxx.xxx.32.85): query: SELECT username as user, 
password, mailenv as userdb_mail, uid as userdb_uid, gid as userdb_gid 
FROM users WHERE username = 'dan' AND domain = 'domain.net'
Mar 22 18:16:43 tg1 dovecot: auth-worker(default): 
auth(dan at domain.net,xxx.xxx.32.85): username changed dan at domain.net -> dan
Mar 22 18:16:43 tg1 dovecot: auth(default): 
auth(dan at domain.net,xxx.xxx.32.85): username changed dan at domain.net -> dan
Mar 22 18:16:43 tg1 dovecot: auth(default): client out: OK      1 
user=dan
Mar 22 18:16:43 tg1 dovecot: auth(default): master in: REQUEST  1 
24736   1


The line to look for says:

username changed dan at domain.net -> dan

After this point %d is empty which is a problem if you use it in any 
configuration settings (which I'm trying to do).

The login now works because I use the prefetch to fetch the mail and 
home directory informatin out of the database (rather than dynamically 
work it out) but there are some other settings (ie namespaces) where I 
wan to use %d.

Can anyone suggest how to maintain the information in %d?
Particularly why does it shorten the username to "dan"?

Daniel



More information about the dovecot mailing list