The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
A Sendmail client sends outbound mail to another SMTP server, which is typically administered by an ISP or the IT department of an organization, and this server then relays the email to its destination.
To configure a Sendmail client:
If the account on the SMTP server requires authentication:
Create an
auth
directory under/etc/mail
that is accessible only toroot
:#
mkdir /etc/mail/auth
#chmod 700 /etc/mail/auth
In the
auth
directory, create a filesmtp-auth
that contains the authentication information for the SMTP server, for example:#
echo 'AuthInfo:
smtp.isp.com
: "U:username
" "P:password
"' > /etc/mail/auth/smtp-authwhere
smtp.isp.com
is the FQDN of the SMTP server, andusername
andpassword
are the name and password of the account.Create the database file from
smtp-auth
, and make both files read-writable only byroot
:#
cd /etc/mail/auth
#makemap hash smtp-auth < smtp-auth
#chmod 600 smtp-auth smtp-auth.db
Edit
/etc/mail/sendmail.mc
, and change the following line:dnl define('SMART_host', 'smtp.your.provider')dnl
to read:
define('SMART_host', '
smtp.isp.com
')dnlwhere
smtp.isp.com
is the FQDN of the SMTP server.If the account on the SMTP server requires authentication, add the following lines after the line that defines
SMART_host
:define('RELAY_MAILER_ARGS', 'TCP $h
port
')dnl define('confAUTH_MECHANISMS', 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE('authinfo','hash /etc/mail/auth/smtp-auth.db')dnl define(`confAUTH_OPTIONS', `A p y')dnlwhere
port
is the port number used by the SMTP server (for example, 587 for SMARTTLS or 465 for SSL/TLS).Edit
/etc/sysconfig/sendmail
and set the value ofDAEMON
tono
:DAEMON=no
This entry disables
sendmail
from listening on port 25 for incoming email.Restart the
sendmail
service:#
service sendmail restart
To test the configuration, send email to an account in another domain.
This configuration does not receive or relay incoming email. You can use a client application to receive email via POP or IMAP.