BLOG
Enjoy when you can, and endure when you must.
配置Postfix SMTP的SASL认证

这里我利用dovecot提供的SASL来完成postfix中SMTP的认证。

1.配置dovecot:

打开dovecot的配置文件(/etc/dovecot.conf),修改内容如下:

auth default {
    mechanisms = plain login
    passdb pam {
    }
    userdb passwd {
    }
    user = root
    socket listen {
      client {
        path = /var/spool/postfix/private/auth
        mode = 0660
        user = postfix
        group = postfix
      }
    }
}

2.配置postfix:

打开postfix的配置文件(/etc/postfix/main.cf),修改内容如下:

smtpd_sasl_authenticated_header = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks,
                        permit_sasl_authenticated,
                        reject_unauth_destination

参考资料:

Postfix SASL Howto

Postfix/dovecot 的 SASL 与 SSL/TLS 指南

COMMENTS
LEAVE COMMNT