Ask the Community
Groups
Email Notifications Troubleshooting - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>Steps to troubleshoot Unitrends Backup System failure to send email notifications.</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p> </p> <h2 data-id="purpose">Purpose</h2> <p>Troubleshoot Unitrends Backup System failure to send email notifications.</p> <h2 data-id="description">Description</h2> <p>Email notifications are never received by specified recipient.</p> <h2 data-id="n-a"> <br> </h2> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <p> </p> <h2 data-id="resolution-1">Resolution</h2> <p><strong>Office 365 not using the correct domain:</strong><br><a href="https://kaseya.vanillacommunities.com/home/leaving?allowTrusted=1&target=https%3A%2F%2Fwww.unitrends.com%2Fblog%2Fsend-mail-notifications-office365" rel="noopener nofollow">https://www.unitrends.com/blog/send-mail-notifications-office365</a><br>Please ensure you are NOT using smtp.office365.com - You will want to use the YOURDOMAIN-com.mail.protection.outlook.com</p> <h3 data-id="smtp-traffic-blocked-by-environment-and-gmail"><strong>SMTP traffic blocked by environment AND Gmail</strong></h3> <p>Configure the Unitrends Backup System to relay mail through an external SMTP server via the submission port, which is port 587.</p> <p>To configure the SMTP server, do the following:</p> <p>In the Unitrends Backup System user interface,</p> <p>Go to Configure > Appliances, edit appliance and Email tab.</p> <p>Fill in SMTP server.</p> <p>If necessary ( it is for Gmail ), check the box next to SMTP Server Authentication Required</p> <p>If authentication is required, fill in the username and password fields</p> <p>Fill in the Test Email Address field</p> <p>Click Confirm</p> <p> </p> <p>In the console/shell of the Backup System:<br>Connect to your appliance through the console (Press Alt+F2 to access the command line) or via SSH using PuTTY or another utility to SSH to your appliance's IP address through port 22. You will need to know the root OS password which can be <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fkaseya.vanillacommunities.com%2Fkb%2Farticles%2Faliases%2Funitrends%2Fhc%2Fen-us%2Farticles%2F360013245998" rel="noopener nofollow">reset via console access</a>.</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> <h3 data-id="domain-alias-in-etc-hosts"><strong>Domain alias in /etc/hosts</strong></h3> <p>Login to the Backup System user interface, and go to Clients, Networks, and Notifications.</p> <p>Click on Networks, then Hostname.</p> <p>Change the Fully Qualified Hostname entry to a fully hostname, ie. backup<em>.</em>domain<em>.</em>com, instead of just domain.com.</p> <p>Go up one level in the UI menu to Networks, and click on Hosts. Remove any host aliases for domain.com.</p> <h3 data-id="test-email-transport"><strong>Test Email Transport</strong></h3> <p>Connect to your appliance through the console (Press Alt+F2 to access the command line) or via SSH using PuTTY or another utility to SSH to your appliance's IP address through port 22. You will need to know the root OS password which can be <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fkaseya.vanillacommunities.com%2Fkb%2Farticles%2Faliases%2Funitrends%2Fhc%2Fen-us%2Farticles%2F360013245998" rel="noopener nofollow">reset via console access</a>.</p> <p>From the command line, send a test message to yourself, ie.</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">echo Subject: test; echo; echo test|/usr/sbin/sendmail -Am -i <em>-f <a rel="nofollow" href="mailto:sender@domain.com">sender@domain.com</a></em> -v <a rel="nofollow" href="mailto:user@domain.com">user@domain.com</a> </pre> <p><em>add '-f <a rel="nofollow" href="mailto:sender@domain.com">sender@domain.com</a>' to test replacing the sender address with the from address designated in the master.ini ReportFrom field. Without this flag the test will use <a rel="nofollow" href="mailto:root@hostname">root@hostname</a> instead. To permanently change sender address follow KB: <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fkaseya.vanillacommunities.com%2Fkb%2Farticles%2Faliases%2Funitrends%2Fhc%2Fen-us%2Farticles%2F360013149717" rel="noopener nofollow">How do I change the 'from' address and domain for email reports</a></em></p> <p>This command will "walk" the SMTP process and will report any failures in the output (DNS resolution failures, authentication failures, etc). If the message sends successfully, at the end you will see "Message queued for delivery" or in some cases OK SENT (depends on the type of server doing the relay). <br><br>You can also tail the maillog:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">tail -f /var/log/maillog Hit CTRL-c to exit tail.</pre> <p> In addition we can run 'mail' </p> <pre class="code codeBlock" spellcheck="false" tabindex="0">[root@Uni01 ~]# mail Heirloom Mail version 12.5 7/5/10. Type ? for help. "/var/spool/mail/root": 77 messages 9 new 75 unread U 59 Mail Delivery Subsys Thu Aug 20 14:02 68/2701 "Warning: could not send message for past 4 hours" U 60 Mail Delivery Subsys Thu Aug 20 15:02 68/2701 "Warning: could not send message for past 4 hours"</pre> <p> </p> <h2 data-id="additional-troubleshooting">Additional Troubleshooting</h2> <p><br>If you reboot the system and the mail will not flow need to check that the service is set to start on boot.<br><br>chkconfig --list |grep sendmail<br>sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off<br>[root@Unitrends-Hampton log]# chkconfig sendmail on<br>[root@Unitrends-Hampton log]# chkconfig --list |grep sendmail<br>sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off</p> <p>Google may require the account to be "unlocked" in order to do this the customer will need to visit: <a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwww.google.com%2Faccounts%2FDisplayUnlockCaptcha" rel="noopener nofollow">http://www.google.com/accounts/DisplayUnlockCaptcha</a><br><br>Also see <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fsupport.google.com%2Fmail%2Fanswer%2F14257" rel="noopener nofollow">https://support.google.com/mail/answer/14257</a> for more information on Gmail account issues.</p> <h2 data-id="cause"><strong>CAUSE</strong></h2> <p> </p> <h2 data-id="causes">Causes</h2> <h3 data-id="smtp-traffic-blocked-by-environment"><strong>SMTP traffic blocked by environment:</strong></h3> <p>Many network firewalls and internet service providers block or filter outgoing traffic on the default SMTP port, 25, in order to prevent the sending of unsolicited bulk email, or spam, from their networks. 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 both "<a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fsupport.google.com%2Faccounts%2Fanswer%2F6010255%3Fhl%3Den" rel="noopener nofollow">Less Secure Apps</a>" turned ON and 2-Step Authentication turned OFF. Authentication will fail otherwise.</p> <h3 data-id="gapps">GApps</h3> <p>Gapps, or Google Apps, has unique requirements in comparison to Gmail. Please use Gmail, not Gapps, for relay from Unitrends devices.</p> <h3 data-id="top-level-domain-alias-in-etc-hosts"> <br>Top-level domain alias in /etc/hosts:</h3> <p>Often, customers will mistakenly enter their toplevel domain name in the Fully Qualified Host Name field under Settings / Clients, Networing, & Notifications / Networks / Hostname.</p> <p>This creates an alias in the /etc/hosts file pointing their domain name to the IP address of the Backup System. Consequently, the Backup System sends all mail for given domain to itself, and usually fails with the error “User uknown.”<br><br><strong>Passwords:</strong><br>Sendmail doesn't support certain special characters: Pound/Hash #, Equals-sign =, and colon : are not supported characters and will result in bad username and password errors when testing email transport. Also do not use the quotation mark in any password ".</p> </article> </main>