0

我决定在这里而不是在服务器故障上发布此内容,因为那里的社区很小,而且我近 80% 的问题都没有得到解答...

所以我的服务器有 3 个域:x.com、y.com 和 z.com。x.com 内部中继,y.com 内部中继,z.com 应该通过 amazon SES 中继。

现在,x 和 y.com 内部邮件正确,但我需要 z.com 通过 SES 中继。

所以,到目前为止,我在 main.cf 中的配置:

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_transport domainz_sasl_auth_enable = yes domainz_sasl_security_options = noanonymous domainz_sasl_password_maps = hash:/etc/postfix/sas2_passwd domainz_use_tls = yes domainz_tls_security_level = encrypt domainz_tls_note_starttls_offer = yes domainz_tls_cadle.

在我的 master.cf 中,我在默认 smtp 上方附加了一个 unix 通道:

domainz unix - - n - 1 smtp smtp inet n - n - - smtpd

在我的 sender_transport 我有

@domainZ.com domainz: 1. 在哪里输入“email-smtp.us-east-1.amazonaws.com”的ses smtp。我假设我们需要点击“domainz:”,以便我们可以将正确的 sasl 数据传递给它。2. 请记住,这是从服务器发出的邮件,而不是从服务器发出的邮件,所以这就是我没有设置 transport_map 的原因。这是我从@domainz 推送邮件时遇到的错误:“status=bounced(找不到主机或域名。name=domainz type=AAAA 的名称服务错误:找不到主机)”;因此,在我们甚至可以到达亚马逊的 SES 主机之前,我在传输级别遇到了一个我似乎无法弄清楚的问题。

谢谢,迈克

4

1 回答 1

1

After nearly 24 hours of trying to solve this, I finally figured it out. I hope this helps whomever is looking to use this same method and doesn't have to go through the pain I just went through!

So in my example above, domain x + y relayed through virtual aliases. For z we must use a transport, in this case it was a sender_dependent_relayhost_maps transport, so I can grab the sender and relay them through amazon SES.

In main.cf, regardless of smtp/unix-socket, we straight up use SES standards:

smtp_sasl_auth_enable=yes
smtp_sasl_security_options=noanonymous
smtp_sasl_password_maps=hash:/etc/postfix/sas
smtp_use_tls=yes
smtp_tls_security_level=encrypt
smtp_tls_note_starttls_offer=yes
smtp_tls_CAfile=/etc/ssl/certs/ca-bundle.crt

In sender_dependent_relayhost_maps we use:

@domainz.com   [email-smtp.us-east-1.amazonaws.com]:25

The smtp_sasl_password_maps file stores the matching relay's user:key.

And that's it!

于 2013-06-21T07:50:25.430 回答