Ask the Community
Groups
Change the SMTP Port Number for Email Reports - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>How to change the SMTP port number for email reports.</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p>The SMTP port needs to be changed due to email server requirements, including local email servers, Gmail, etc.</p> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <ol><li>Connect to the appliance via SSH</li> <li>Make a backup copy of the sendmail configuration file: <pre class="code codeBlock" spellcheck="false" tabindex="0">cd /etc/mail/ cp sendmail<em>.</em>mc sendmail<em>.</em>mc.backup</pre> </li> <li>Edit the sendmail configuration file: <pre class="code codeBlock" spellcheck="false" tabindex="0">vi sendmail<em>.</em>mc</pre> </li> <li>Within the configuration file, locate the following lines: <pre class="code codeBlock" spellcheck="false" tabindex="0"># SMTP daemon options O DaemonPortOptions=Name=</pre> </li> <li>Add the following line below the above two lines: <pre class="code codeBlock" spellcheck="false" tabindex="0">O DaemonPortOptions=Port=587, Name=MSA, M=E alternately you can add or modify these lines define(`SMART_HOST',`smtp.gmail.com')<br>define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl<br>define(`ESMTP_MAILER_ARGS', `TCP $H 587')dnl Please write quit the file :wq! </pre> </li> <li>then you have to M4 the file <pre class="code codeBlock" spellcheck="false" tabindex="0"> m4 /etc/mail/sendmail<em>.</em>mc > /etc/mail/sendmail<em>.</em>cf</pre> </li> <li>Restart the sendmail service: <pre class="code codeBlock" spellcheck="false" tabindex="0">service sendmail restart</pre> </li> <li>Send a test email: <pre class="code codeBlock" spellcheck="false" tabindex="0">mail <recipient email address> Subject: Testing Body: Hello world.</pre> </li> <li>Press Ctrl+D to send the test email.</li> </ol> </article> </main>