AWS Email Notifications setup for port 587

Purpose

Configure the appliance to use port 587 for SMTP.

 

RESOLUTION


SMTP traffic blocked by environment 

Configure the Unitrends Backup System to relay mail through an external SMTP server via the submission port, which is port 587.

In the console/shell of the Backup System:
Login to AWS, click on Instance -> Connect -> Session Manager. The screen looks similar to the image as shown in below. Click on Connect, the console will be opened in new tab. 
mceclip2.png

Once console is opened follow the below steps.

vi /etc/mail/sendmail.mc

Locate the following line:

define(`SMART_HOST`,`smtp.gmail.com')

Note: smtp.gmail.com will be replaced with the SMTP server you specified above.

Insert the following two lines AFTER the SMART_HOST line above:

define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl

Save the file

Issue the following command at the shell prompt

m4 /usr/share/sendmail-cf/m4/cf.m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart

 

Causes

SMTP traffic blocked by environment:

AWS blocks outbound traffic on port 25 (SMTP) of all EC2 instances and Lambda functions by default. This prevents the Unitrends Backup System from successfully sending email notifications.

Gmail:

Gmail will not relay mail via port 25, thus attempts to send mail via the default configuration will fail.
Gmail use port 587, requires authentication, and the account used must have 2-Step Authentication turned ON and App password.  Authentication will fail otherwise.
Note: In password field you need to enter app password (not gmail password).

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Contact us