| 1 |
Return-Path: <> |
| 2 |
Received: from a192-13.smtp-out.amazonses.com (a192-13.smtp-out.amazonses.com [199.255.192.13]) |
| 3 |
by 3jo.example.jp (V8/cf) with ESMTP id p983Gkqb006703 |
| 4 |
for <[email protected]>; Sat, 8 Oct 2011 12:16:46 +0900 |
| 5 |
X-Original-To: 00000132e188591e-2882d710-aacc-49e9-bfac-5400b02ffb9b-000000@email-bounces.amazonses.com |
| 6 |
Delivered-To: 00000132e188591e-2882d710-aacc-49e9-bfac-5400b02ffb9b-000000@email-bounces.amazonses.com |
| 7 |
Message-Id: <00000132e18869c0-f2f2c897-f15b-11e0-abc0-17dd0736b394-000000@email.amazonses.com> |
| 8 |
Date: Sat, 8 Oct 2011 03:16:46 +0000 |
| 9 |
To: [email protected] |
| 10 |
From: [email protected] |
| 11 |
Subject: Delivery Status Notification (Failure) |
| 12 |
MIME-Version: 1.0 |
| 13 |
Content-Type: multipart/report; report-type=delivery-status; boundary="QPlGA.4hi2fg4GM.1JoJoP.3UxabUS" |
| 14 |
X-AWS-Outgoing: 199.255.192.13 |
| 15 |
|
| 16 |
--QPlGA.4hi2fg4GM.1JoJoP.3UxabUS |
| 17 |
content-type: text/plain; |
| 18 |
charset="utf-8" |
| 19 |
Content-Transfer-Encoding: quoted-printable |
| 20 |
|
| 21 |
The following message to <[email protected]> was undeliverable. |
| 22 |
The reason for the problem: |
| 23 |
5.3.0 - Other mail system problem 550-'Unknown user this-local-part-does-not-exist-on-the-server@docomo.= |
| 24 |
ne.jp' |
| 25 |
|
| 26 |
--QPlGA.4hi2fg4GM.1JoJoP.3UxabUS |
| 27 |
content-type: message/delivery-status |
| 28 |
|
| 29 |
Reporting-MTA: dns; a192-79.smtp-out.amazonses.com |
| 30 |
|
| 31 |
Final-Recipient: rfc822;[email protected] |
| 32 |
Action: failed |
| 33 |
Status: 5.0.0 (permanent failure) |
| 34 |
Remote-MTA: dns; [203.138.181.240] |
| 35 |
Diagnostic-Code: smtp; 5.3.0 - Other mail system problem 550-'Unknown user [email protected]' (delivery attempts: 0) |
| 36 |
|
| 37 |
--QPlGA.4hi2fg4GM.1JoJoP.3UxabUS |
| 38 |
content-type: message/rfc822 |
| 39 |
|
| 40 |
Received: from unknown (HELO aws-bacon-dlvr-svc-na-i-68075b08.us-east-1.amazon.com) ([10.13.204.161]) |
| 41 |
by na-mm-outgoing-6102-bacon.iad6.amazon.com with ESMTP; 08 Oct 2011 02:53:28 +0000 |
| 42 |
Return-Path: 00000132e188591e-2882d710-aacc-49e9-bfac-5400b02ffb9b-000000@email-bounces.amazonses.com |
| 43 |
From: [email protected] |
| 44 |
To: [email protected] |
| 45 |
Subject: TEST |
| 46 |
MIME-Version: 1.0 |
| 47 |
Content-Type: text/plain; charset=UTF-8 |
| 48 |
Content-Transfer-Encoding: 7bit |
| 49 |
Date: Sat, 8 Oct 2011 03:16:41 +0000 |
| 50 |
Message-ID: <00000132e188591e-2882d710-aacc-49e9-bfac-5400b02ffb9b-000000@email.amazonses.com> |
| 51 |
X-AWS-Outgoing: 199.255.192.79 |
| 52 |
|
| 53 |
These are sample scripts that show how to use Amazon Simple Email Service |
| 54 |
(Amazon SES) from the command line. To learn more about these scripts, see |
| 55 |
the Amazon SES Developer Guide. |
| 56 |
|
| 57 |
PREREQUISITES |
| 58 |
------------- |
| 59 |
Before running these scripts, you must fulfill the following prerequisites: |
| 60 |
|
| 61 |
* You must have an Amazon Web Services account, and must also sign up for |
| 62 |
Amazon SES. See the Amazon SES Getting Started Guide |
| 63 |
for more information. |
| 64 |
|
| 65 |
* You must install Perl version 5.6.0 or later. If you already have Perl |
| 66 |
installed, you can determine your version number by typing |
| 67 |
|
| 68 |
perl -v |
| 69 |
|
| 70 |
at the command prompt. If you do not have Perl installed, go to |
| 71 |
http://www.perl.org for more information. |
| 72 |
|
| 73 |
* Depending on the version of Perl that you are using, you may need to install |
| 74 |
some additional Perl modules. To install these modules, run the following |
| 75 |
commands: |
| 76 |
|
| 77 |
perl -MCPAN -e 'install Digest::SHA' |
| 78 |
perl -MCPAN -e 'install URI::Escape' |
| 79 |
perl -MCPAN -e 'install Bundle::LWP' |
| 80 |
perl -MCPAN -e 'install LWP::Protocol::https' |
| 81 |
perl -MCPAN -e 'install MIME::Base64' |
| 82 |
perl -MCPAN -e 'install Crypt::SSLeay' |
| 83 |
perl -MCPAN -e 'install XML::LibXML' |
| 84 |
|
| 85 |
Please ensure that you are using the latest versions of these modules. |
| 86 |
|
| 87 |
INSTALLATION |
| 88 |
------------ |
| 89 |
To install these scripts, copy them to a directory of your choice. We suggest |
| 90 |
that you copy them to /opt/third-party/amazon/ses. You might need |
| 91 |
administrative privileges to do this. |
| 92 |
|
| 93 |
Help is available for these scripts - simply run one of them with the "--help" |
| 94 |
parameter. Here is an example: |
| 95 |
|
| 96 |
ses-get-stats.pl --help |
| 97 |
Usage: |
| 98 |
ses-get-stats.pl [--help] [-e URL] [-k FILE] [--verbose] -s | -q |
| 99 |
|
| 100 |
For more information, please refer to the Amazon SES Developer Guide. |
| 101 |
|
| 102 |
AWS CREDENTIALS FILE |
| 103 |
-------------------- |
| 104 |
Each of these Amazon SES scripts requires an AWS credentials file. To prepare |
| 105 |
an AWS credentials file, follow these instructions: |
| 106 |
|
| 107 |
* Create a new text file. In our example, we call it "aws-credentials". |
| 108 |
|
| 109 |
* Go to http://aws.amazon.com and look up your AWS credentials: Click on |
| 110 |
Account, and then Security Credentials. |
| 111 |
|
| 112 |
* Copy your Access Key ID and Secret Access Key into the "aws-credentials" file. |
| 113 |
|
| 114 |
* Change the permissions on the file so that only you have read/write access. |
| 115 |
(This step is *very* important, because no one else should see your Secret |
| 116 |
Access Key.) |
| 117 |
|
| 118 |
* Your credentials file should look similar to the following: |
| 119 |
AWSAccessKeyId=022QF06E7MXBSH9DHM02 |
| 120 |
AWSSecretKey=kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct |
| 121 |
|
| 122 |
You can now use this AWS credentials file with the "-k" parameter when running |
| 123 |
any of the Amazon SES scripts. For example: |
| 124 |
|
| 125 |
ses-get-stats.pl -k aws-credentials -s |
| 126 |
|
| 127 |
TROUBLESHOOTING |
| 128 |
--------------- |
| 129 |
|
| 130 |
* Command not found: |
| 131 |
|
| 132 |
This means that your command line interpreter (or shell) cannot find the |
| 133 |
script. Try running it again with a fully qualified path name, such as: |
| 134 |
|
| 135 |
/opt/third-party/amazon/ses/bin/ses-send-email.pl |
| 136 |
|
| 137 |
If you change your current working directory to this location, you can |
| 138 |
run the script as follows: |
| 139 |
|
| 140 |
./ses-send-email.pl |
| 141 |
|
| 142 |
Alternatively, you can include your current working directory in your |
| 143 |
PATH variable, so that you can run the script without prepending "./". |
| 144 |
|
| 145 |
* /usr/bin/perl: bad interpreter: No such file or directory: |
| 146 |
|
| 147 |
By default, these scripts expect the Perl interpreter to be located at |
| 148 |
"/usr/bin/perl". If the Perl interpreter is installed elsewhere, or not |
| 149 |
installed at all, you will receive the error message printed above. |
| 150 |
|
| 151 |
To correct this, you can edit the first line in the script so that it |
| 152 |
refers to your Perl installation (for example, /opt/third-party/bin/perl). |
| 153 |
You can also specify your Perl interpreter on the command line: |
| 154 |
|
| 155 |
/opt/third-party/bin/perl ./ses-send-email.pl |
| 156 |
|
| 157 |
* Can't locate SES.pm in @INC: |
| 158 |
|
| 159 |
Each of the Amazon SES scripts require the "SES.pm" Perl module. This |
| 160 |
error means that Perl could not find SES.pm in the list of directories |
| 161 |
where Perl modules are located. By default, the Amazon SES scripts |
| 162 |
expect SES.pm to reside in the same directory as the scripts themselves. |
| 163 |
To correct this error, try one of the following: |
| 164 |
|
| 165 |
1) Before running the script, set the PERL5LIB variable to the directory |
| 166 |
where SES.pm is located. For example: |
| 167 |
export PERL5LIB=/opt/third-party/amazon/ses |
| 168 |
|
| 169 |
2) Modify the scripts so that they can find SES.pm in the correct |
| 170 |
directory: |
| 171 |
use lib '/opt/third-party/amazon/ses'; |
| 172 |
|
| 173 |
3) Use the "-I" command line switch to add the specified search path to |
| 174 |
Perl's list of module directories: |
| 175 |
perl -I/opt/third-party/amazon/ses ./ses-send-email.pl |
| 176 |
|
| 177 |
--QPlGA.4hi2fg4GM.1JoJoP.3UxabUS-- |