Professional Documents
Culture Documents
EX200 Red Hat Certified System Administrator (RHCSA) Exam 2016-07-26
EX200 Red Hat Certified System Administrator (RHCSA) Exam 2016-07-26
Environment
Red Hat Enterprise Linux 3
Red Hat Enterprise Linux 4
Red Hat Enterprise Linux 5
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
Sendmail
Issue
How to configure a Sendmail smart host
How to forward all emails destined for remote recipients to a centralized mail server
How to configure a relay host in Sendmail
Resolution
To configure a Sendmail Smart Host, follow these steps:
Raw
dnl define(`SMART_HOST',`smtp.your.provider')dnl
Remove dnl ("delete through newline") from the beginning of the line :
Raw
define(`SMART_HOST',`smtp.your.provider') dnl
2. Now substitute smtp.your.provider with the address of the SMTP relay server. There are four
possible formats:
For example:
Raw
define(`SMART_HOST',`redhat.com')
https://access.redhat.com/solutions/10658 1/3
7/23/2017 How to configure a Sendmail Smart Host - Red Hat Customer Portal
define(`SMART_HOST',`redhat.com')
[hostname] - DNS is looked up normally, MX record is ignored. Use this if the MX record is
different from the hostname, and you do not want to use it.
For example:
Raw
define(`SMART_HOST',`[redhat.com]')
For example:
Raw
define(`SMART_HOST',`[192.0.2.4]')
For example:
Raw
define(`SMART_HOST',`[IPv6:2002:c0a8:51d2::23f4]')
Raw
Raw
# make -C /etc/mail
# service sendmail restart
https://access.redhat.com/solutions/10658 2/3
7/23/2017 How to configure a Sendmail Smart Host - Red Hat Customer Portal
# service sendmail restart
OR
Raw
https://access.redhat.com/solutions/10658 3/3