[Dovecot] Auth checking also the service
Hello everyone. I'm switching to dovecot from courier-imap and after some problems with Apple Mail client, now everything seems to be fine. The only problem that I have not solved yet is to check also the service (pop3, pop3s, imap, imaps) in the authentication phase. In courier-authlib I do this:
MYSQL_SELECT_CLAUSE SELECT username,
password,
"",
1002,
1003,
'/vmail',
maildir,
quota,
name,
""
FROM mailbox
WHERE username="$(local_part)@$(domain)"
AND active=1
AND $(service)=1
where $(service) can be pop3, pop3s, imap or imaps. Is it possible to do a similar thing in dovecot?
Thank you in advance,
Alex
Alle 11:06, sabato 18 novembre 2006, Johannes Berg ha scritto:
On Sat, 2006-11-18 at 10:44 +0100, Alex wrote:
where $(service) can be pop3, pop3s, imap or imaps. Is it possible to do a similar thing in dovecot?
Yes, read variables.txt. I'm not sure it distinguishes between the /s versions though.
Thank you, I found %s variable, but as you say, it's not possible to distinguish between the ssl version.
In the same variables.txt file I found:
For login_log_format_elements there are also these variables:
%m - authentication method (eg. PLAIN) %c - SSL, TLS or empty
Is it not possible to make the %c variable available in the password_query directive?
Thanks,
Alex
On Sat, 2006-11-18 at 11:38 +0100, Alex wrote:
For login_log_format_elements there are also these variables:
%m - authentication method (eg. PLAIN) %c - SSL, TLS or empty
Is it not possible to make the %c variable available in the password_query directive?
I don't see why it wouldn't be possible but haven't looked at the code.
I wonder why you even need to distinguish between these though. Are we still in the days where encryption is a value-added service? :)
johannes
Alle 12:14, sabato 18 novembre 2006, Johannes Berg ha scritto:
I don't see why it wouldn't be possible but haven't looked at the code.
I wonder why you even need to distinguish between these though. Are we still in the days where encryption is a value-added service? :)
I have to distinguish pop3/pop3s and imap/imaps because I need mailboxes with ssl access only. It's a way to force users to do secure connection. :-)
-- Alessandro 'Asterix' Astarita aleast@capri.it Capri Online S.r.l. http://www.caprionline.it/ "Unix IS user friendly. It's just selective about who its friend are"
participants (3)
-
Alessandro Astarita
-
Alex
-
Johannes Berg