I am trying to send emails with my verified address (usertest@gmail.com), using an Ubuntu AWS Instance with postFix & Amazon SES but It is not working with postfix.
1) I've downloaded an "Amazon Simple Email Service Scripts" from this site
I followed the guide, and I can send emails using the following line:
./ses-send-email.pl --verbose -k aws-credentials -s "Test from SES" -f
usertest@gmail.com usertest@gmail.com
so everything works good.
2) I've installed postfix, and I added the following line into /etc/postfix/master.cf in order to integrate the point 1
aws-email unix - n n - - pipe flags=R user=usertest
argv=/opt/amazon-mail/ses-send-email.pl -r -k
/opt/amazon-mail/aws-credentials -e
https://email.us-east-1.amazonaws.com -f usertest@gmail.com
${recipient}
and then I added into /etc/postfix/main.cf
default_transport = aws-email
but when I try to send an email using:
echo test | mail -s "test email sent" usertest@gmail.com
I don't receive the email because postfix automatically remplaces the sender email address from usertest@gmail.com to root@gmail.com and root@gmail.com is not a verified email.
Also I've tried to set an alias in /etc/aliases but postfix doesn't replace root by usertest.
I only want to send some emails with my gmail email address in my PHP site allocated in a AWS Micro Instance. Its my first time in Amazon Cloud World, I think, I am doing something wrong here.
Could you help me?
Thanks in Advance.