To configure sendmail easily, install the
# yum install sendmail-cf
Changes to the sendmail configuration are made to the file
To generate a new
# cd /etc/mail
# make
This must be done after each change is made to
# service sendmail reload
(You can also use the Restart button in the Services tool.)
7.6.1.2. Configuring sendmail to use a mail relay
Some Internet Service Providers (ISPs) block email traffic to all mail servers except their own. This is intended to block viruses that set themselves up as a mail server, but it also interferes with Fedora's default sendmail configuration, which expects to be able to send email directly to the destination system.
To configure sendmail to send your outbound email through your ISP's mail server, find the line in
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(QSMART_HOST',Q
In this file, dnl means
define(QSMART_HOST',Q
7.6.1.3. Configuring sendmail to accept inbound email
Fedora's standard sendmail configuration does not accept email from remote systems, a feature that must be enabled if the system is going to act as an Internet email host.
To enable remote inbound connections, locate the line in
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(QPort=smtp,Addr=127.0.0.1, Name=MTA')dnl
Add dnl to the start of this line to comment it out:
dnl DAEMON_OPTIONS(QPort=smtp,Addr=127.0.0.1, Name=MTA')dnl
sendmail will then accept connections on all network interfaces and deliver mail that is addressed to a user on the local host. For example, if the hostname is
To configure sendmail to accept mail for other destinations, add those destinations to the file
# local-host-names - include all aliases for your machine here.
Remember to enable inbound connections on port 25 (SMTP) in your firewall configuration.
7.6.1.4. Using aliases
There are many standard email addresses that people expect to be able to use:
Aliases are configured in the file
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.
#
# >>>>>>>>>> The program 'newaliases' must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#
# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root
# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
...(Lines snipped)...