Sendmail as mail relay

Taking Redhat with the initial and default sendmail configuration.

Add your domain to be relay from sendmail:

vi /etc/mail/access

Connect:sendmail.mydomain RELAY

Connect: RELAY

Compile the entries with:
makemap hash /etc/mail/access < /etc/mail/access

Change the following line in order to allow sendmail to listen to right IP rather than the localhost lookup address:

vi /etc/mail/


dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl

Now, and as unfortunately I do not access to my local DNS server, I would add my mail server to the host file:

vi /etc/hosts            domino2


and now, I add my name server domino2 to as Smart relay host

vi /etc/mail/

# "Smart" relay host (may be null)

keep in mind that Sendmail 8.13 having by default the Reverse DNS IP lookup feature, which would verify if the IP match with the domain that the helo at the initial SMTP transaction.

Restart sendmail

/etc/init.d/sendmail restart


Leave a Reply