Configuring Email notifications using AWS SES

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ahmed82
Posts: 1
Joined: Sun Mar 24, 2019 2:49 am

Configuring Email notifications using AWS SES

Post by ahmed82 »

Hello,
I configured postfix to use the username and password that was generated by aws SES and used the proper port for it. however, When I run the mail command I am unable to send mail but when running the sendmail command, I am able to send mail.

Here's the mail command:
echo "This is the main body of the mail" | mail -s "Subject of the Email" <reciever's email> -f <sender_email/my AWS SES verified email>

And here's the error I am getting:
smtp; 554 Message rejected: Email address is not verified when using the mail command
Diagnostic-Code: smtp; 554 Message rejected: Email address is not verified. The
following identities failed the check in region REGION: root
<root@myserver>,
root@myserver

I have seen other posts online with people having issues with the mail command not working with AWS SES. How does this effect the nagios email alerts? I am unable to use the service to send mail.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuring Email notifications using AWS SES

Post by scottwilkerson »

On many versions of mail you need to use -r to specifu the from address and it needs to be before the reciever's email

try this

Code: Select all

echo "This is the main body of the mail" | mail -s "Subject of the Email"  -r <sender_email/my AWS SES verified email> <reciever's email>
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked