Dovecot:断开连接,连接关闭,身份验证失败

Dovecot:断开连接,连接关闭,身份验证失败

我在 Ubuntu Server 22.04(VMware Workstation 16 虚拟机)上安装了 Postfix+Dovecot。然后我部署了 Ubuntu 22.04 Desktop 并开始在 Geary 中创建新邮箱。但它显示“未创建帐户:请检查您的发送服务器详细信息”。我可以在 中看到一些有趣的条目/var/log/mail.log

Jan 19 16:40:17 mailserver dovecot: imap-login: Disconnected: Connection closed (auth failed, 1 attempts in 4 secs): user=<obfuscated>, method=PLAIN, rip=192.168.0.220, lip=192.168.0.212, session=<JX+MEp7ymNTAqADc>

服务器名称为mailserver.example.com。用户邮件:[电子邮件保护] SSL/TLS:没有。

/etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = maildir:~/Maildir
mail_privileged_group = mail

/etc/dovecot/dovecot.conf

protocols = imap lmtp

10-master.conf

service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    mode = 0600
    user = postfix
    group = postfix
    }
 }
ervice auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
}
    

/etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no
auth_username_format = %n
auth_mechanisms = plain login

/etc/postfix/main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
compatibility_level = 3.6

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mailserver.tne.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, example.com, mailserver.example.com, localhost.example.com, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
message_size_limit = 52428800
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtputf8_enable = no

以下是 的 nmap 结果mailserver

PORT    STATE  SERVICE
22/tcp  open   ssh
25/tcp  open   smtp
80/tcp  open   http
110/tcp closed pop3
143/tcp open   imap
443/tcp closed https
465/tcp closed smtps
587/tcp open   submission
993/tcp closed imaps
995/tcp closed pop3s

我想我应该添加有关用户的信息,但我不知道在哪个文件中。

答案1

日志中有一个错误:

mailserver postfix/proxymap[75657]: error: open /etc/postfix/mysql_virtual_domains_maps.cf: No such file or directory

所以我创建了该文件并且它已开始通过 Roundcube 发送消息!

相关内容