ãäèãããããã
åçãçãããã
PostfixãããããããããSMTP(SMTPS)æçãããããéäããããã
èãããããæèãããããããã
[ãããããã]
èãGoogleæççããããæåãçèããã
stunnelãäãããããããããSMTPSæçãããããããææã
ãããããããèãããããããæåãããããããããããã
çæãäããèãæçãããããããåããããçåãéäãããããæãåãããããããï
ãããããçæããèãéãããåãããã
ãããã
- opensslããããããéä(äèæè1)ãåéããåä
- telnetããããããstunnelãäããéä(äèæè2)ãåéããåä
- æéãpostfixãäãããããããããéä(äèæè3)ããããããã
- ããäãããããã(PHPãRubyçãããããæçããéäãåéããããããã
[åæãçå]
OS: CentOS 6.6
Postfix: 2.6.6
============================================================
* æè1: opensslããããããããããããéä
============================================================
... sslæçããããããçç
220 ESMTP Server Ready
EHLO test
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-SIZE 15727616
250 8BITMIME
auth login
334 VXNlcm5hbWU6
ãããID(BASE64ãããããæã)
334 UGFzc3dvcmQ6
ãããããããã(BASE64ãããããæã)
235 Authentication successful
250 Requested mail action okay, completed
250 Requested mail action okay, completed
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: testSubject
testBody
.
250 Requested mail action okay, completed
QUIT
221 Service closing transmission channel
read:errno=0
============================================================
* [OK]telnetããstunnelççããããããããéä
============================================================
#
#
# ## stunnelãèå
# [docomo-mail]
# client = yes
#
$ telnet 127.0.0.1 10465
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 ESMTP Server Ready
EHLO test
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-SIZE 15727616
250 8BITMIME
auth login
334 VXNlcm5hbWU6
ãããID(BASE64ãããããæã)
334 UGFzc3dvcmQ6
ãããããããã(BASE64ãããããæã)
235 Authentication successful
250 Requested mail action okay, completed
250 Requested mail action okay, completed
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: testSubject
testBody
.
250 Requested mail action okay, completed
QUIT
221 Service closing transmission channel
Connection closed by foreign host.
============================================================
* [NG]postfixããããããããéä
============================================================
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# Â/etc/postfix/sasl_passwd ãèèãpostmapããhashåæã
[127.0.0.1]:10465 Â Â Â Â ãããID:ããããã
# ããããã (äåæèããããã)ããããããéäããããã
Dec Â2 10:29:54 ãããå postfix/smtp[24381]: 893A3200934: to=<ããããã@docomo.ne.jp>, relay=127.0.0.1[127.0.0.1]:10465, delay=0.19, delays=0/0/0.16/0.02, dsn=5.0.0,
status=bounced (host 127.0.0.1[127.0.0.1]
said: 504 Command Parameter not implemented (in reply to MAIL FROM command))