cyrus-imapd 不适用于 sasldb2,但 postfix 可以

cyrus-imapd 不适用于 sasldb2,但 postfix 可以

centos6 64位:

当我使用 pop3 访问 cyrus-imapd 时:

S: +OK li557-53 Cyrus POP3 v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5 server ready <3176565056.1354071404@li557-53>
C: USER [email protected]
S: +OK Name is a valid mailbox
C: PASS abcabc
S: -ERR [AUTH] Invalid login
C: QUIT

并且用户“abc”也失败了。

我的imapd.conf:

configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: auxprop
sasl_mech_list: PLAIN LOGIN
tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt

allowplaintext: true

#defaultdomain: myabc.com
loginrealms: myabc.com

sasldblistuser2:

[email protected]: userPassword

但我的 postfix 对于同一个用户来说没问题。

/etc/sasl2/smtpd.conf

pwcheck_method: auxprop
mech_list: plain login
log_level:7
saslauthd_path:/var/run/saslauthd/mux

/etc/postfix/main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = localhost
mydomain = myabc.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost,$mydomain
local_recipient_maps =
unknown_local_recipient_reject_code = 550
mynetworks_style = subnet
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains = $mydestination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/

mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp

debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_security_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
message_size_limit = 15728640
broken_sasl_auth_clients=yes

请帮忙。

使用 imap:

username: "[email protected]" can login, but can't get mail
username: "abc" can't login

使用 pop:

username: "[email protected]" can login, but repoort: Unable to locate maildrop : Invalid mailbox name
username: "abc", can't login     

cyrus-imapd 邮箱好像有问题。

邮件保存到 user/abc 但从 user/ 获取邮件[电子邮件保护]

答案1

这看起来根本不像 sasl 问题或身份验证问题。我认为你错误配置了 cyrus 邮箱。为了使用带有域部分的邮箱,[email protected]你应该指定

unixhierarchysep: yes

在你的 imapd.conf 中。

然后您应该创建这样的邮箱:

cm user/[email protected]

我认为这足以使 IMAP/POP3 正常工作。

UPD:抱歉,忘记了另一个选项,您在 imapd.conf 中也需要这个选项:

virtdomains: userid

相关内容