Dovecot:无法连接到服务器

Dovecot: Can't connect to server

我正在使用虚拟服务器设置网络。我正在使用 Windows Server 2016 作为我的 DHCP 和 DNS 服务器,它也有活动目录。我还使用 Ubuntu 18.04 作为我的网络 (www) 和网络邮件服务器。所以我安装了 dovecot、postfix 并且我正在使用 squirrelmail。我的域名是arm.com,我的ubuntu服务器,也就是邮件服务器(如前所述)是ubuntusrv.arm.com。我已经将我的网络邮件设置为网络邮件。arm.com。 Ubuntu 服务器的 IP 地址为 192.168.10.3,Windows 服务器的 IP 地址为 192.168.10.10。

我可以通过浏览器访问我的网络邮件(在我域中的客户端 PC 上),但是当我尝试登录时,我在 mail.err:

中收到这些消息
May  8 23:29:38 ubuntusrv dovecot: auth: Error: LDAP: Can't connect to server: ubuntusrv.arm.com:389
May  8 23:29:38 ubuntusrv dovecot: auth-worker(2848): Error: LDAP: Can't connect to server: ubuntusrv.arm.com:389
May  8 23:29:39 ubuntusrv dovecot: auth-worker(2848): Error: pam(klijent1@arm.com,127.0.0.1,<3EXMsSmlUu1/AAAB>): pam_acct_mgmt() failed: Permission denied
May  8 23:29:39 ubuntusrv dovecot: auth: Error: LDAP: Can't connect to server: ubuntusrv.arm.com:389

和 mail.log 中的相同消息加上这一条:

May  8 23:29:41 ubuntusrv dovecot: imap-login: Aborted login (auth failed, 1 attempts in 3 secs): user=<klijent1@arm.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<3EXMsSmlUu1/AAAB>

这是我的 main.cf 后缀文件:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

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

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# 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_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
myhostname = empa-VirtualBox
alias_maps = ldap:/etc/postfix/asap/virtual_group_maps.cf, hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = webmail.arm.com, localhost.localdomain, localhost, arm.com
relayhost = 
mynetworks = 192.168.10.0/24, 127.0.0.1/8 0.0.0.0/0
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
dovecot_destination_recipient_limit = 1

virtual_alias_maps = proxy:ldap:/etc/postfix/asap/virtual_group_maps.cf
sender_bcc_maps =
recipient_bcc_maps =
relay_domains =
relay_recipient_maps =
sender_dependent_relayhost_maps =
smtpd_sasl_local_domain = arm.com
virtual_mailbox_domains = arm.com
virtual_transport = dovecot
transport_maps = hash:/etc/postfix/transport
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/asap/sender_login_maps.cf
virtual_mailbox_maps = proxy:ldap:/etc/postfix/asap/virtual_mailbox_maps.cf
virtual_mailbox_base = /var/vmail/
virtual_uid_maps = static:1002
virtual_gid_maps = static:8

这是我的 dovecot.conf 文件:

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

!include conf.d/*.conf

plugin {
quota_rule = *:storage=1G
}
mail_uid = 1000
mail_gid = 1000
first_valid_uid = 1000
last_valid_uid = 1000
postmaster_address = klijent1@arm.com

userdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf.ext
}
passdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf.ext
}

我是计算机科学与软件工程专业的学生,​​在计算机网络管理方面我是初学者。

感谢您的帮助!

May 8 23:29:38 ubuntusrv dovecot: auth-worker(2848): Error: LDAP: Can't connect to server: ubuntusrv.arm.com:389

您似乎正试图到达 ubuntusrv.arm.com:389。您需要使用域控制器,我建议您始终使用 TLS(端口 636 或 3269)。在不久的将来,Microsoft Active Directory 将需要 TLS 进行连接。

尝试https://help.ubuntu.com/community/LDAPClientAuthentication