Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been following this manual starting at page 26.

First I've already made a tunnel with stunnel, and also I've already got conected via command line with amazon servers, then in my postfix config file I've got this:

# See /usr/share/postfix/ for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination =, localhost, localhost.localdomain
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_transport = error
relay_transport = error

relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

Then when I try to send mail, I've got this error from /var/log/mail.log:

Feb 29 22:23:03 ip-10-166-145-71 postfix/smtpd[29861]: NOQUEUE: reject: RCPT from localhost[]: 550 5.1.1 Recipient address rejected:; proto=ESMTP

I've already granted permissions at the SES panel to Also I don't understand why ehlo is ""... my /etc/mailname is already, also I've tried with exim4 and the result is the same.

I've already found similar questions but seems like I'm the only idiot stuck at this. Here's another tutorial I'm been following.

share|improve this question

<bot>Convert comment to CW</bot>

Detailed step by step was taken from this blog

  1. Download and extract script from this page.

  2. From the README file: These scripts get your AWS access key ID and secret access key from environment variables. The procedure for setting environment variables depends on your operating system. You need to do the following:

    • Create an environment variable called AWS_ACCESS_KEY_ID and set it to your AWS access key ID. Your AWS access key ID will look something like: AKIAIOSFODNN7EXAMPLE.

    • Create an environment variable called AWS_SECRET_ACCESS_KEY and set it to your AWS secret access key. Your AWS secret access key will look something like: wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY.

  3. Test the setup with sending message from perl script.

    $ echo 'test msg' > msgbody.txt
    $ ./ -s "Test of Amazon SES" -f < msgbody.txt
  4. Request SES Access by go to this page.

  5. Configure postfix. Modify the to add

    aws-email  unix  -       n       n       -       -       pipe
        flags=R user=support argv=/opt/thirdparty/amazon/bin/ -r -e -f ${sender} ${recipient}

    Then Modify the to add

    default_transport = aws-email
  6. Copy from extracted folder to /user/local/lib/site_perl (if not existing, create one), this is important!

Script notes:

Amazon SES no longer maintains these scripts. For command-line access to Amazon SES, you can use the AWS Command Line Interface or the AWS Tools for Windows PowerShell. To integrate your mail server with Amazon SES, you can use the Amazon SES Simple Mail Transfer Protocol (SMTP) interface. For more information, see Integrating Amazon SES with Your Existing Email Server.

share|improve this answer

Check the forward and reverse dns records for your host.


share|improve this answer
thanks I've already found workaround at this blog. If I nslookup my IP, I get the default name that amazon uses, but thats not the same name I was getting in my logs. – pacofvf Mar 1 '12 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.