Changes

From Amahi Wiki
Jump to: navigation, search
198 bytes removed ,  20:32, 11 July 2010
no edit summary
cd /etc/mail
sed -ie "s/.*SMART_HOST.*/define(\`SMART_HOST', \`$SMTP_SERVER')dnl/" sendmail.mc
m4 sendmail.mc > sendmail.cf
make
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 connect to use the SMTP serverusing port 587 (TLS/STARTTLS), 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 sed -ie "AuthInfo:$SMTP_SERVER s/\(.*SMART_HOST.*\)/\1\ndefine(\"U:$USERNAME`RELAY_MAILER_ARGS', \" `TCP \"P:$PASSWORDh 587')dnl\ndefine(\" `ESMTP_MAILER_ARGS', \"M:PLAIN`TCP \$h 587')dnl/"" >> access makemap hash accesssendmail.db < accessmc
make
service sendmail restart
</div>
<!--If you need to connect provide a username and password to use the SMTP server using port 587 (TLS/STARTTLS), 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;">
cd /etc/pki/tls/certsSMTP_SERVER=your_isp_smtp_server make sendmail.pemUSERNAME=your_smtp_username PASSWORD=your_smtp_password
cd /etc/mail
sed -ie chmod 640 access echo "s/.*confCACERT_PATH.*/define(AuthInfo:$SMTP_SERVER \`confCACERT_PATH', "U:$USERNAME\`" \/etc"P:$PASSWORD\/pki" \/tls"M:PLAIN\/certs')dnl/" sendmail.mc" >> access sed makemap -ie "s/.*confCACERTr hash access.*/define(\`confCACERT', \`\/etc\/pki\/tls\/certs\/ca-bundle.crt')dnl/" sendmail.mcdb < access sed -ie "s/.*confSERVER_CERTconfAUTH_MECHANISMS.*/define(\`confSERVER_CERTconfAUTH_MECHANISMS', \`\/etc\/pki\/tls\/certs\/sendmail.pemEXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl/" sendmail.mc sed -ie "s/.*confSERVER_KEY.*/define\nFEATURE(\`confSERVER_KEYauthinfo', \`hash \/etc\/pki\/tls\/certsmail\/sendmail.pemaccess')dnl/" sendmail.mc m4 sendmail.mc > sendmail.cf
make
service sendmail restart
</div>
-->