Amazon SES 和 Amavis

Amazon SES 和 Amavis

我一直在关注如何设置邮件服务器- Flurdy 撰写,目的是在我的 Amazon EC2 Ubuntu 12.04 实例上设置更安全的邮件服务器。我完全按照文章中的说明操作,但无法让它与 Amazon SES 一起工作。

已为 Postfix 设置了 Amazon SES文档

#Amavis 配置:
content_filter = amavis:[127.0.0.1]:10024

#SES 配置:
中继主机 = email-smtp.us-east-1.amazonaws.com:25
smtp_sasl_auth_enable = 是
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = 哈希:/etc/postfix/sasl_passwd
smtp_use_tls = 是
smtp_tls_security_level = 加密
smtp_tls_note_starttls_offer = 是
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

随着 Amaviscontent_filter取消注释,邮件日志显示延期

>> postfix/smtp[6534]: 0C1084605: to=<[email protected], relay=127.0.0.1[127.0.0.1]:10024, delay=35, delays=35/0.03/0/0, dsn=4.7.4, status=deferred (TLS is required, but was not offered by host 127.0.0.1[127.0.0.1])

然而,当content_filter被注释掉时 - 中继设置为 Amazon SES - 并且电子邮件发送正常..

>> postfix/smtp[6697]: 333744B3B: to=<[email protected]>, relay=email-smtp.us-east-1.amazonaws.com[54.243.161.229]:25, delay=19, delays=17/0/0.8/0.6, dsn=2.0.0, status=sent (250 Ok 0000013e5a87e718-87720c2b-5542-4e3d-8034-57f3152e2e05-000000)

有人能解释一下吗?谢谢

答案1

强制smtp_tls_security_level = encryptpostfix 使用 TLS,即使你的本地 amavis 过滤器可能不支持它

你可以添加-o smtp_tls_security_level=none到 amavis/reinject 实例中master.cf以使其正常工作

因此,从你的 how-to 页面复制后,你的 master.cf 可能看起来应该是这样的:

amavis unix - - - - 2 smtp 
  -o smtp_data_done_timeout=1200 
  -o smtp_send_xforward_command=yes 
  -o disable_dns_lookups=yes 
  -o max_use=20
  -o smtp_tls_security_level=none        <----- add this line



 127.0.0.1:10025 inet n - - - - smtpd 
  -o content_filter= 
  -o local_recipient_maps= 
  -o relay_recipient_maps= 
  -o smtpd_restriction_classes= 
  -o smtpd_delay_reject=no 
  -o smtpd_client_restrictions=permit_mynetworks,reject 
  -o smtpd_helo_restrictions= 
  -o smtpd_sender_restrictions= 
  -o smtpd_recipient_restrictions=permit_mynetworks,reject 
  -o smtpd_data_restrictions=reject_unauth_pipelining 
  -o smtpd_end_of_data_restrictions= 
  -o mynetworks=127.0.0.0/8 
  -o smtpd_error_sleep_time=0 
  -o smtpd_soft_error_limit=1001 
  -o smtpd_hard_error_limit=1000 
  -o smtpd_client_connection_count_limit=0 
  -o smtpd_client_connection_rate_limit=0 
  -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
  -o smtp_tls_security_level=none    <----- add this line

相关内容