「Amazon SES」:修訂間差異
跳至導覽
跳至搜尋
無編輯摘要 |
|||
(未顯示同一使用者於中間所作的 7 次修訂) | |||
第2行: | 第2行: | ||
== 讓Postfix使用SES == | == 讓Postfix使用SES == | ||
=== 安裝 === | |||
官方文件有提到要先裝這些套件<ref name="doc-ses-postfix">{{Cite web |url=https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html | title=Integrating Amazon SES with Postfix |accessdate=2018-12-16}}</ref>,但大家常常都會忘記,所以有可能會遇到套件沒有裝: | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install -y libsasl2-modules | |||
</syntaxhighlight> | |||
參考官方文件提供的<code>/etc/postfix/main.cf</code>設定<ref name="doc-ses-postfix"/>,這邊假定是使用<code>us-east-1</code>的SES服務: | |||
<syntaxhighlight lang="ini"> | <syntaxhighlight lang="ini"> | ||
relayhost = [email-smtp.us-east-1.amazonaws.com]:587 | |||
smtp_sasl_auth_enable = yes | smtp_sasl_auth_enable = yes | ||
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd | smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd | ||
第10行: | 第21行: | ||
smtp_tls_security_level = encrypt | smtp_tls_security_level = encrypt | ||
smtp_use_tls = yes | smtp_use_tls = yes | ||
</syntaxhighlight> | |||
以及<code>/etc/postfix/sasl_passwd</code>: | |||
<syntaxhighlight lang="ini"> | |||
[email-smtp.us-east-1.amazonaws.com]:587 AKxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |||
</syntaxhighlight> | |||
並且產生對應的檔案: | |||
<syntaxhighlight lang="bash"> | |||
sudo postmap hash:/etc/postfix/sasl_passwd | |||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2018年12月26日 (三) 06:06 的最新修訂
Amazon SES是AWS的郵件服務。
讓Postfix使用SES
安裝
官方文件有提到要先裝這些套件[1],但大家常常都會忘記,所以有可能會遇到套件沒有裝:
sudo apt install -y libsasl2-modules
參考官方文件提供的/etc/postfix/main.cf
設定[1],這邊假定是使用us-east-1
的SES服務:
relayhost = [email-smtp.us-east-1.amazonaws.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = encrypt
smtp_use_tls = yes
以及/etc/postfix/sasl_passwd
:
[email-smtp.us-east-1.amazonaws.com]:587 AKxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
並且產生對應的檔案:
sudo postmap hash:/etc/postfix/sasl_passwd
參考文獻
- ↑ 1.0 1.1 Integrating Amazon SES with Postfix. [2018-12-16].