先生们,无法让 Postfix 与 SES 协同工作。
我可以从本地帐户发送,但通过 telnet localhost 25...我得到以下信息:
Mar 14 19:25:52 localhost postfix/smtpd[6634]: B3CCF1EB807B: client=mail.mofodomain[127.0.0.1]
Mar 14 19:25:54 localhost postfix/cleanup[6629]: B3CCF1EB807B: message-id=<[email protected]>
Mar 14 19:25:54 localhost postfix/qmgr[6624]: B3CCF1EB807B: from=<[email protected]>, size=418, nrcpt=1 (queue active)
Mar 14 19:25:54 localhost postfix/pipe[6631]: connection established
Mar 14 19:25:54 localhost postfix/pipe[6631]: master_notify: status 0
Mar 14 19:25:54 localhost postfix/pipe[6631]: deliver_request_initial: send initial status
Mar 14 19:25:54 localhost postfix/pipe[6631]: send attr status = 0
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 3
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: queue_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: queue_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: active
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: queue_id
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: queue_id
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: B3CCF1EB807B
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: offset
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: offset
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 652
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: size
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: size
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 418
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: nexthop
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: nexthop
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: gmail.com
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: encoding
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: encoding
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: sender
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: sender
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: [email protected]
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: envelope_id
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: envelope_id
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: ret_flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: ret_flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 0
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: time
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: time
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: DDdhTwAAAACC7g0AAAAAABI3YU8AAAAAxI0DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: log_client_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: log_client_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: mail.mofodomain
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: log_client_address
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: log_client_address
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 127.0.0.1
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: log_protocol_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: log_protocol_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: SMTP
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: log_helo_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: log_helo_name
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: adamslifebrokerage.com
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: sasl_method
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: sasl_method
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: sasl_username
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: sasl_username
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: sasl_sender
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: sasl_sender
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: rewrite_context
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: rewrite_context
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: local
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: recipient_count
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: recipient_count
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 1
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: (list terminator)
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: original_recipient
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: original_recipient
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: [email protected]
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: recipient
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: recipient
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: [email protected]
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: offset
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: offset
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 630
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: dsn_orig_rcpt
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: dsn_orig_rcpt
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: rfc822;[email protected]
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: notify_flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: notify_flags
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute value: 0
Mar 14 19:25:54 localhost postfix/pipe[6631]: aws-email socket: wanted attribute: (list terminator)
Mar 14 19:25:54 localhost postfix/pipe[6631]: input attribute name: (end)
Mar 14 19:25:54 localhost postfix/pipe[6631]: deliver_request_get: file active/B3CCF1EB807B
Mar 14 19:25:54 localhost postfix/pipe[6631]: deliver_message: from <[email protected]>
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const /usr/src/ses/bin/ses-send-email.pl
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const -r
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const -k
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const /usr/src/ses/bin/aws-credentials
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const -e
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const https://email.us-east-1.amazonaws.com
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const -f
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: const [email protected]
Mar 14 19:25:54 localhost postfix/pipe[6631]: dict_eval: expand ${recipient} -> [email protected]
Mar 14 19:25:55 localhost postfix/pipe[6631]: connect to subsystem private/bounce
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr nrequest = 0
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr flags = 0
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr queue_id = B3CCF1EB807B
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr original_recipient = [email protected]
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr recipient = [email protected]
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr offset = 630
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr dsn_orig_rcpt = rfc822;[email protected]
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr notify_flags = 0
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr status = 5.3.0
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr diag_type = x-unix
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr diag_text = User name is missing: 'undisclosed-recipients:;'.
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr mta_type =
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr mta_mname =
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr action = failed
Mar 14 19:25:55 localhost postfix/pipe[6631]: send attr reason = Command died with status 1: "/usr/src/ses/bin/ses-send-email.pl". Command output: User name is missing: 'undisclosed-recipients:;'.
Mar 14 19:25:55 localhost postfix/pipe[6631]: private/bounce socket: wanted attribu
aws-email unix - n n - - pipe -v
flags=R user=boconnor argv=/usr/src/ses/bin/ses-send-email.pl -r -k /usr/src/ses/bin/aws-credentials -e https://email.us-east-1.amazonaws.com -f [email protected] ${recipient}
答案1
这是 AWS 人员为解决我的情况所推荐的方法:(https://forums.aws.amazon.com/thread.jspa?threadID=89611&tstart=0)
你好,
说实话,Postfix 似乎无法用 ${recipient} 变量替换收件人电子邮件地址。您可以按照文档添加 --verbose 以从 Perl 脚本中获取更多调试信息。
此外,由于我们现在支持 STARTTLS,您可以通过将 Postfix 连接到我们的 SMTP 端点的端口 25 来完全避免这种情况,并使您的系统更易于管理。我们的文档中有更多信息。
谢谢,如果有帮助的话请告诉我。
保罗 http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/Scripts.SendingFormattedEmail.html http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/SMTP.html