การกำหนดค่า Postfix SASL

Oct 02 2020

เรามีแอพพลิเคชั่นอย่าง 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 

คำตอบ

tater Oct 02 2020 at 16:45

หาก postfix จะทำหน้าที่เป็นเซิร์ฟเวอร์ (เช่น SMTP ภูต) smtpd_และจะได้รับการดำเนินการตรวจสอบแล้วคุณจะต้องใส่อนุมัติใน จากคำถามดูเหมือนว่าคุณได้ใส่ไว้ในsmtp_(ลูกค้า)

สิ่งที่ต้องการ

smtpd_sasl_security_options = noanonymous
smtpd_sasl_auth_enable = yes

โดยทั่วไปแล้วการอนุญาตจะไม่เข้าไปsasl_passwdเนื่องจากเป็นการจัดเก็บรหัสผ่านสำหรับเซิร์ฟเวอร์ระยะไกล