JumpStart I: Configuring sendmail on a Client


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

  • Uses a remote SMTP servertypically an ISPto relay outbound email to its destination (an SMTP relay).

  • Sends to the SMTP server email originating from the local system only. It does not forward email originating from other systems.

  • Does not handle inbound email. As is frequently the case, you need to use POP or IMAP to receive email.

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.





A Practical Guide to Red Hat Linux
A Practical Guide to Red HatВ® LinuxВ®: Fedoraв„ў Core and Red Hat Enterprise Linux (3rd Edition)
ISBN: 0132280272
EAN: 2147483647
Year: 2006
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net