Tip: You may not need to configure sendmail to send email With sendmail running, give the command described under under "Test" on page 631. As long as sendmail can connect to port 25 outbound, you should not need to set up sendmail to use an SMTP relay as described in this section. If you receive the mail sent by the test, you can skip this section. This JumpStart configures an outbound sendmail server. This server
To set up this server, you must edit /etc/mail/sendmail.mc and restart sendmail.
Change sendmail.mc The dnl at the start of the following line in sendmail.mc indicates that this line is a comment: dnl define('SMART_HOST','smtp.your.provider') To specify a remote SMTP server, you must open sendmail.mc in an editor and change the preceding line, deleting dnl from the beginning of the line and replacing smtp.your.provider with the FQDN of your ISP's SMTP server (obtain this name from your ISP). Be careful not to alter the back ticks (') and the single quotation marks (') in this line. If your ISP's SMTP server is at smtp.myisp.com, you would change the line to define('SMART_HOST','smtp.myisp.com') Tip: Do not alter the back ticks (') or the single quotation marks (') Be careful not to alter the back ticks (') or the single quotation marks (') in any line in sendmail.mc. These symbols control the way the m4 preprocessor converts sendmail.mc to sendmail.cf; sendmail will not work properly if you do not preserve these symbols.
Restart sendmail When you restart it, sendmail regenerates the sendmail.cf file from the sendmail.mc file you edited: # /sbin/service sendmail restart
Test Test sendmail with the following command: $ echo "my sendmail test" | /usr/sbin/sendmail user@remote.host Replace user@remote.host with an email address on another system where you receive email. You need to send email to a remote system to make sure that sendmail is relaying your email. |