我在ubuntu LTS上使用带有mysql的postfix / dovecot验证用户时遇到了问题。
下面是dovecot配置
感谢大家阅读:
需要手动创建/ var / spool / postfix / private / auth
root@server:~# postconf -n
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
disable_vrfy_command = yes
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 0
mydestination =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, rej ect_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth Basic SPAM prevention
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,permit
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.cert
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql-virtual-mailbox-maps. cf
然后dovecot是:
root@server:~# dovecot -n
# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab088.4 x86_64 Ubuntu 12.04.5 LTS simfs
auth_mechanisms = plain login
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacati on subaddress comparator-i;ascii-numeric relational regex imap4flags copy includ e variables body enotify environment mailbox date ihave
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = imap pop3 sieve
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0600
user = postfix
}
unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
}
user = dovecot
}
service imap-login {
inet_listener imap {
port = 0
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol imap {
imap_client_workarounds = delay-newmail
mail_max_userip_connections = 10
}
protocol pop3 {
mail_max_userip_connections = 10
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
deliver_log_format = msgid=%m: %$
mail_plugins = sieve
postmaster_address = postmaster
quota_full_tempfail = yes
rejection_reason = Your message to <%t> was automatically rejected:%n%r
}
和mail.log是
Sep 30 08:22:10 server postfix/submission/smtpd[1466]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 30 08:22:10 server postfix/submission/smtpd[1466]: connect from unknown[182.186.87.163]
Sep 30 08:22:11 server postfix/submission/smtpd[1466]: warning: SASL: Connect to private/auth? Basic SPAM prevention failed: No such file or directory
Sep 30 08:22:11 server postfix/submission/smtpd[1466]: fatal: no SASL authentication mechanisms
Sep 30 08:22:12 server postfix/master[1448]: warning: process /usr/lib/postfix/smtpd pid 1466 exit status 1
Sep 30 08:22:12 server postfix/master[1448]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Sep 30 08:22:45 server dovecot: auth-worker: mysql(127.0.0.1): Connected to database mailserver
Sep 30 08:23:05 server dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<route36@buyorsell.it>, method=PLAIN, rip=182.186.87.163, lip=162.250.122.195, TLS
还需要什么
答案 0 :(得分:2)
检查你的postfix main.cf.看来你的smtpd_sasl_path有一个注释。
应该是:
smtpd_sasl_path = private/auth
不
smtpd_sasl_path = private/auth Basic SPAM prevention