没有机制可用

时间:2014-05-30 17:22:56

标签: postfix-mta sasl

我正在尝试设置邮件服务器。我按照这个指南: http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-12.10

一切都适用于squirrelmail,我可以发送和接收电子邮件。当我尝试连接到具有Outlook的服务器时,它连接正常,我可以接收电子邮件,但我无法发送它们。

我尝试通过telnet发送:

EHLO ***
AUTH LOGIN
334 VXNlcm5hbWU6
my64bitEncodedUsername
334 UGFzc3dvcmQ6
my64bitEncodedPass
535 5.7.8 Error: authentication failed: no mechanism available

在/var/log/mail.log中,我接受了这一行:

postfix/smtpd[19421]: warning: *****[*******]: SASL LOGIN authentication failed: no mechanism available

我的/etc/postfix/sasl/smtpd.conf文件:

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: ****
sql_passwd: ****
sql_database: mail
sql_select: select password from users where email = '%u@%r'

postconf -n输出:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
debug_peer_level = 3
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = *****, localhost, localhost.localdomain
myhostname = ******
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = no
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000

3 个答案:

答案 0 :(得分:1)

添加main.cf:

smtpd_sasl_type = cyrus
cyrus_sasl_config_path = /etc/postfix/sasl/

然后重新启动postfix

答案 1 :(得分:0)

在Ubuntu 14.04下,这为我解决了这个问题:

apt-get install libsasl2-modules

答案 2 :(得分:-1)

看看这个:http://bit.ly/1lgj1tf可能会有所帮助,但它帮助了我。为了捷径, 类型: smtpd_sasl_type = cyrus cyrus_sasl_config_path = / etc / postfix / sasl /  重启postfix