Amazon SESãrelayhostã¨ãã¦ä½¿ç¨ããããã®Postfixã®è¨å®
PostfixããSESã«ã¡ã¼ã«ãæããæ¹æ³ã¯2種é¡ãã
- STARTTLSã使ç¨ããæ¹æ³
- SMTPsã使ç¨ããæ¹æ³
Postfixèªä½ã®è¨å®ã¯SMTPsã使ãæ¹ãã·ã³ãã«ã§ãããã
SMTPsã使ç¨ããå ´åã¯Stunnelã¨ããå¥ã®ãã¼ã¢ã³ãå¿
è¦ã«ãªãã
STARTTLSã¯Postfixã ã(å¥ã®ã¢ã¸ã¥ã¼ã«ã¯ä½¿ããã»ã»ã»)ã®è¨å®ã§ä½¿ç¨ã§ããã®ã§ã
ä»åã¯STARTTLSã使ãæ¹å¼ãé¸ãã ã
STARTTLSã使ç¨ããå ´åã®ã¡ã¼ã«ã®æµã
-----------Webãµã¼ã---------------
|webã¢ããª,cron,etc... -> Postfix | -> SES -> å®å
----------------------------------
â ãã®éä¿¡ã§STARTTLSãã
åæ
- Verified Sendersã®è¨å®ã¯æ¸ãã§ãã
- SMTP Settingsã«ã¦ãMy SMTP Credentialsãä½ææ¸ã§ãã
ä¸è¨è¨å®ã«ã¤ãã¦ã¯ãã¡ããåç §
å¿ è¦ãªããã±ã¼ã¸(debian squeezeã®å ´å)
- postfix
- libsasl2-modules
è¨å®
# /etc/postfix/main.cf
relayhost = [email-smtp.us-east-1.amazonaws.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/ses_sasl
smtp_sasl_security_option = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
relayhost
ã¯å¤åãã¡ã¼ã«ã®éä¿¡å
SMTPãµã¼ã
FQDNãå²ãã§ãã[]ã¯ç¡ãã¦ãåããã
OP25Bãªç°å¢ã§ãªããã°25ã§ãåããã
# /etc/postfix/ses_sasl
[email-smtp.us-east-1.amazonaws.com]:587 AUTHUSERNAME:AUTHPASSWORD
AUTHUSERNAME:AUTHPASSWDã«ã¯SMTPèªè¨¼ã®ID/PASSãå ¥åãã
sudo postmap /etc/postfix/ses_sasl
ä¸è¨ã³ãã³ãã§/etc/postfix/ses_sasl.db
ãã¡ã¤ã«ãçæããã
è¨å®ãå®äºããããpostfixãåèµ·å
/etc/init.d/postfix restart
以ä¸ã®æé ã§ãå¤åãã®ã¡ã¼ã«ãSESçµç±ã§éä¿¡ãããããã«ãªã
ãã®ä»ã注æ
- ãããã®From: åã³ Envelope-fromã®ã¢ãã¬ã¹ãVerifiedã§ããå¿ è¦ããã
- ç¸æã«å±ãã¡ã¼ã«ã®Return-pathã¯amazonses.comã®ãã®ã«æ¸ãæãããã¦ãã
SES å
¬å¼ããã¥ã¡ã³ã
確èªç°å¢ : Debian GNU/Linux 6.0(squeeze)