I've installed a postfix/dovecot mail services on DigitalOcean. I'm using certificates provided by letsencrypt. There are no errors in syslog that relate to problems with the certificates.
I'm using mysql to store the virtual users.
The connection string is:
connect = host=127.0.0.1 dbname=servermail user=usermail password=REDACTED (with the correct password, this tests okay and there are no connection errors reported on startup)
When I attempt to connect from a client, I see this in the log:
Apr 04 10:15:43 imap-login: Info: Disconnected (auth failed, 1 attempts in 2 secs): user=, method=PLAIN, rip=42.115.84.125, lip=206.189.150.255, TLS: Disconnected, session=
Incoming mail is being delivered successfully by Postfix.
Output of dovecot -n
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
postmaster_address = dev@vietfeir.com
protocols = imap lmtp
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
}
user = dovecot
}
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
userdb {
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static
}
Please give me some troubleshooting ideas.
Here is the SQL query used to create a user in the database:
INSERT INTO `servermail`.`virtual_users`
(`domain_id`, `password` , `email`)
VALUES
('1', ENCRYPT('*REDACTED*!', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'dennis@vietfeir.com')
My client (Bluemail) has a choice of plain or CRAM-MD5 passwords. Outlook seems to only allow plain, so I think this might be the problem as I have chose an SHA based scheme. (SHA512-CRYPT)