Postfix SASL 配置

Postfix SASL 配置

我们有像 Jira 这样的应用程序需要向用户发送电子邮件。已使用 Postfix 作为电子邮件服务器并进行了下面提到的配置。测试连接、测试电子邮件一切正常。我想启用 SASL 身份验证,并为此进行了配置。但身份验证似乎并没有真正起作用。我在 Jira 中输入了错误的用户名和密码,但它仍然能够连接到服务器并能够发送电子邮件。有人能帮帮我吗?

/etc/postfix/sasl_passwd,我输入了以下内容

test-jira@<domainname.com> jira_test:test123

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
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
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname,<"all other destination list">
mydomain = <"my domain name">
myhostname =  <"my hotname name">
mynetworks = <"ALL IPS">
myorigin = $mydomain 
newaliases_path = /usr/bin/newaliases.postfix 
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = $mydestination
relayhost = <"MY RELAY HOST SERVER DETAILS">
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes 
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 
smtp_sender_dependent_authentication = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination 
unknown_local_recipient_reject_code = 550 

答案1

如果 postfix 充当服务器(即 SMTP 守护程序)并将执行身份验证,则需要将授权放入smtpd_。从问题来看,您似乎已将其放入smtp_(客户端)。

就像是

smtpd_sasl_security_options = noanonymous
smtpd_sasl_auth_enable = yes

通常情况下,授权不会进入,sasl_passwd因为这是存储密码的偏僻的服务器。

相关内容