Skip to content

Instantly share code, notes, and snippets.

@vegaasen
Created October 18, 2016 13:40
Show Gist options
  • Save vegaasen/da899ce5c2da2e840a09d361bd78c6d4 to your computer and use it in GitHub Desktop.
Save vegaasen/da899ce5c2da2e840a09d361bd78c6d4 to your computer and use it in GitHub Desktop.
Sendmail on Linux

Installing Sendmail on RHEL

Required packages

sudo yum install sendmail sendmail-cf m4

Overview of configurables

Configurables defined in /etc/mail/.

  • access
    • Allow/Deny other systems to use Sendmail for outbound emails.
  • domaintable
    • Used for domain name mapping for Sendmail.
  • local-host-names
    • Used to define aliases for the host.
  • mailertable
    • Defined the instructions that override routing for particular domains.
  • virtusertable
    • Specifies a domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine.

Configuration

Allow any hosts

Remove the following line from the sendmail.mc-file:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Add this line also in sendmail.mc above ‘MAILER’ option

FEATURE(`relay_hosts_only')dnl

Add your host to allow relaying

<hostname> >> /etc/mail/relay-domains

 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment