When the network that was to evolve into the Internet was first set up, it connected a few computers, each serving a large number of users and running several services. Each computer was capable of sending and receiving email and had a unique hostname, which was used as a destination for email. Today the Internet has a large number of transient clients. Because these clients do not have fixed IP addresses or hostnames, they cannot receive email directly. Users on these systems usually maintain an account on an email server run by their employer or an ISP, and they collect email from this account using POP or IMAP. Unless you own a domain that you want to receive email at, you will not need to set up sendmail as an incoming SMTP server. You can set up sendmail on a client system so that it simply relays outbound mail to an SMTP server. This configuration is required by organizations that use firewalls to prevent email from being sent out on the Internet from any system other than the company's official mail servers. As a partial defense against spreading viruses, some ISPs block outbound port 25 to prevent their customers from sending email directly to a remote computer. This configuration is required by these ISPs. You can also set up sendmail as an outbound server that does not use an ISP as a relay. In this configuration, sendmail connects directly to the SMTP servers for the domains receiving the email. An ISP set up as a relay is configured this way. You can set up sendmail to accept email for a registered domain name as specified in the domain's DNS MX record (page 726). However, most mail clients (MUAs) do not interact directly with sendmail to receive email. Instead, they use POP or IMAPprotocols that include features for managing mail folders, leaving messages on the server, and reading only the subject of an email without downloading the entire message. If you want to collect your email from a system other than the one running the incoming mail server, you may need to set up a POP or IMAP server, as discussed on page 647. PrerequisitesInstall the following packages:
Run chkconfig to cause sendmail to start when the system goes multiuser (by default, sendmail does not run in single-user mode): # /sbin/chkconfig sendmail on Start sendmail. Because sendmail is normally running, you need to restart it to cause sendmail to reread its configuration files. The following restart command works even when sendmail is not runningit just fails to shut down sendmail: # /sbin/service sendmail restart Shutting down sendmail: [ OK ] Shutting down sm-client: [ OK ] Starting sendmail: [ OK ] Starting sm-client: [ OK ] Run chkconfig to cause the SpamAssassin daemon, spamd, to start when the system enters multiuser mode (SpamAssassin is normally installed in this configuration): # /sbin/chkconfig spamassassin on As with sendmail, SpamAssassin is normally running. Restart it to cause spamd to reread its configuration files: # /sbin/service spamassassin restart Stopping spamd: [ OK ] Starting spamd: [ OK ] The IMAP and POP protocols are implemented as several daemons. See page 647 for information on these daemons and how to start them. Notes
Firewall An SMTP server normally uses TCP port 25. If the SMTP server system is running a firewall, you need to open this port. Using the Red Hat graphical firewall tool (page 768), select Mail (SMTP) from the Trusted Services frame to open this port. For more general information see Chapter 25, which details iptables.
cyrus This chapter covers the IMAP and POP3 servers included in the dovecot package. Red Hat Linux also provides IMAP and POP3 servers in the cyrus-imapd package. More Information
Web sendmail www.sendmail.org IMAP www.imap.org IMAP and POP3 www.dovecot.org IMAP and POP3 cyrusimap.web.cmu.edu SquirrelMail www.squirrelmail.org Postfix www.postfix.org/docs.html (alternative MTA, page 652) Qmail qmail.area.com Mailman www.list.org procmail www.procmail.org SpamAssassin spamassassin.org Spam database razor.sourceforge.net |