Difference between revisions of "Enable Outgoing Emails"

From Amahi Wiki
Jump to: navigation, search
(Created page with 'Here's how to enable outgoing emails on your Amahi server. As root: <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-…')
 
Line 5: Line 5:
 
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
 
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
 
   SMTP_SERVER=your_isp_smtp_server
 
   SMTP_SERVER=your_isp_smtp_server
   yum install sendmail-cf
+
   yum -y install sendmail-cf m4
  sed -ie "s/.*SMART_HOST.*/define(\`SMART_HOST', \`$SMTP_SERVER')dnl/" /etc/mail/sendmail.mc
 
 
   cd /etc/mail
 
   cd /etc/mail
   make
+
   sed -ie "s/.*SMART_HOST.*/define(\`SMART_HOST', \`$SMTP_SERVER')dnl/" sendmail.mc
 +
  m4 sendmail.mc > sendmail.cf
 
   service sendmail restart
 
   service sendmail restart
 
</div>
 
</div>
  
 
Make sure to replace ''your_isp_smtp_server'' on the first line with the hostname or IP address of your ISP SMTP server.
 
Make sure to replace ''your_isp_smtp_server'' on the first line with the hostname or IP address of your ISP SMTP server.
 +
 +
If you need to provide a username and password to use the SMTP server, you'll need to do this too:
 +
 +
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
 +
  SMTP_SERVER=your_isp_smtp_server
 +
  USERNAME=your_smtp_username
 +
  PASSWORD=your_smtp_password
 +
  cd /etc/mail
 +
  echo "AuthInfo:$SMTP_SERVER \"U:$USERNAME\" \"P:$PASSWORD\" \"M:PLAIN\"" >> access
 +
  m4 sendmail.mc > sendmail.cf
 +
  makemap hash access < access
 +
</div>

Revision as of 02:11, 8 July 2010

Here's how to enable outgoing emails on your Amahi server.

As root:

 SMTP_SERVER=your_isp_smtp_server
 yum -y install sendmail-cf m4
 cd /etc/mail
 sed -ie "s/.*SMART_HOST.*/define(\`SMART_HOST', \`$SMTP_SERVER')dnl/" sendmail.mc
 m4 sendmail.mc > sendmail.cf
 service sendmail restart

Make sure to replace your_isp_smtp_server on the first line with the hostname or IP address of your ISP SMTP server.

If you need to provide a username and password to use the SMTP server, you'll need to do this too:

 SMTP_SERVER=your_isp_smtp_server
 USERNAME=your_smtp_username
 PASSWORD=your_smtp_password
 cd /etc/mail
 echo "AuthInfo:$SMTP_SERVER \"U:$USERNAME\" \"P:$PASSWORD\" \"M:PLAIN\"" >> access
 m4 sendmail.mc > sendmail.cf
 makemap hash access < access