
#Uncomment for Sendmail to listen on port 587 DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl #Add the below lines: FEATURE(`authinfo', `hash /etc/mail/auth/client-info.db')dnlįEATURE(`access_db', `hash -T -o /etc/mail/access.db')dnl #Uncomment the below lines: TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnlĭefine(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl #Add the below two lines in your sendmail.mc file to listen on port 465 and 587: define(`RELAY_MAILER_ARGS', `TCP $h 587')dnlĭefine(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl Make the following changes in sendmail.mc file below is the command: vim /etc/mail/sendmail.mc define(`SMART_HOST', `')dnl
virtusertable: allowing multiple virtual domains to be hosted on one machine. mailertable: used to override routing for particular domains.
local-host-names: used to define an alias for a host. domaintable: used for domain name mapping for Sendmail.
access: allowing or denying other systems to use Sendmail for outbound emails. M4.x86_64 0:1.4.16-10.el7 sendmail.x86_64 0:8.14.7-5.el7 sendmail-cf.noarch 0:8.14.7-5.el7īefore directly edit /etc/mail/sendmail.mc for configuration we need to understand important file existence in /etc/mail directory. Once the installation is done, you will be getting output like this: Transaction Summary (Note: m4 is a macro processor you need to use to compile Sendmail configuration file. Install Sendmail with dependency from yum package manager sudo yum install sendmail sendmail-cf m4 Highly recommended to have root privileges in order to perform the below steps: Step 1Īdd the centos 7 EPEL repositories, open terminal and paste the below command: sudo yum install epel-release Prerequisites Before you Install Sendmail Server on Centos 7 Sendmail is recommended by most of the system administrator as an MTA(Mail transfer agent) server over other MTAs. Sendmail is a feature-rich MTA (Mail Transfer Agent) uses SMTP protocol for sending mail. Though Sendmail has been replaced by postfix in modern RHEL versions it is widely used in RHEL 5 or its earlier version. The author voluntarily contributed this tutorial as a part of Pepipost Write to Contribute program.