[Dovecot] sasl authentication via dovecot
Frank Church
voipfc at googlemail.com
Fri Mar 16 10:35:58 EET 2007
I am setting up a Postfix/Dovecot/Virtual Domains system, with virtual
tables using Postfixadmin and MySQL. Incoming mail is accepted for the
virtual mailboxes, but when I try to retrieve mail from Outlook or
Thunderbird I get errors
You cannot log in to abc.server.net because the server has disabled
login. You may need to connect via SSL or TLS. Please check the
account settings for your mail server
As Dovecot is handling the auth I suspect that it is where the problem
lies. Are they any faults in the settings below that could be the
cause?
As I understand it because Dovecot is handling the login and
monitoring the IMAP and POP ports. All the initial authentication is
supposed to be handled there before Postfix gets involved.
Running lsof -i:port on ports 110, 143, 993 and 995 shows that
dovecot is handling all those inbound connections.
I am also seeing messages in the log as follows
dovecot: imap-login: Aborted login: rip:81.150.x.x, lip=66.90.x.x
my auth section in Dovecot is as follows
auth default {
mechanisms = plain login
passdb sql {
args = /etc/dovecot/sql.conf
}
userdb sql {
args = /etc/dovecot/sql.conf
}
userdb prefetch {
}
user = nobody
socket listen {
master {
# path = /var/run/dovecot/auth-master
path = /usr/local/var/run/dovecot/auth-master
mode = 0660
user = vmail
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = mail
}
}
}
My sql.conf is as follows
driver = mysql
connect = host=localhost dbname=postfix user=dovecot password=password
user_query = SELECT concat('/var/vmail/', maildir) as home,
concat('maildir:/var/vmail/', maildir) as mail, 601 AS uid, 12 AS gid,
concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username
= '%u' AND active = '1'
password_query = SELECT username as user, password,
concat('/var/vmail/', maildir) as userdb_home,
concat('maildir:/var/vmail/', maildir) as userdb_mail, 601 as
userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND
active = '1'
this is the smtpd section from main.cn
# ---------------------- SASL PART START ----------------------
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
#smtpd_sasl_local_domain = $myhostname
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
# ---------------------- SASL PART END ----------------------
More information about the dovecot
mailing list