Ask the Community
Groups
AWS Email Notifications setup for port 587 - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="purpose"><strong>Purpose</strong></h2> <p>Configure the appliance to use port 587 for SMTP.</p> <p> </p> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <h2 data-id="smtp-traffic-blocked-by-environment"><strong><br>SMTP traffic blocked by environment <br><br></strong></h2> <p>Configure the Unitrends Backup System to relay mail through an external SMTP server via the submission port, which is port 587.<br><br></p> <p>In the console/shell of the Backup System:<br><span lang="EN-US" data-contrast="auto" xml:lang="EN-US">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. </span><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/AIZUOCG5XMUT/mceclip2.png" alt="mceclip2.png" class="embedImage-img importedEmbed-img"></img><br><br>Once console is opened follow the below steps.</p> <p>vi /etc/mail/sendmail<em>.</em>mc</p> <p>Locate the following line:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">define(`SMART_HOST`,`smtp<em>.</em>gmail<em>.</em>com')</pre> <p>Note: smtp<em>.</em>gmail<em>.</em>com will be replaced with the SMTP server you specified above.</p> <p>Insert the following two lines AFTER the SMART_HOST line above:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl</pre> <p>Save the file</p> <p>Issue the following command at the shell prompt</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">m4 /usr/share/sendmail-cf/m4/cf.m4 /etc/mail/sendmail<em>.</em>mc > /etc/mail/sendmail<em>.</em>cf service sendmail restart</pre> <p> </p> <h2 data-id="causes">Causes</h2> <h3 data-id="smtp-traffic-blocked-by-environment-1"><strong>SMTP traffic blocked by environment:</strong></h3> <p>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.</p> <h3 data-id="gmail"><strong>Gmail:</strong></h3> <p>Gmail will not relay mail via port 25, thus attempts to send mail via the default configuration will fail.<br>Gmail use port 587, requires authentication, and the account used must have 2-Step Authentication turned ON and App password. Authentication will fail otherwise.<br>Note: In password field you need to enter app password (not gmail password).</p> </article> </main>