1830899 Members
2847 Online
110017 Solutions
New Discussion

Sendmail Relay Question

 
Andrew Kaplan
Super Advisor

Sendmail Relay Question

I was doing a security scan of our sendmail server and discovered it was configured to allow relaying. I want to turn this off and wanted to confirm the setting that I should change.

I went to the /etc/mail/sendmail.cf file and located the following lines:

# maximum hop count
#0 MaxHopCount=25

If I change the second line to read:

0 MaxHopCount=0

Will that turn off relaying? If not, where else should I go to correct this?

FYI -- The version of sendmail that is currently in use is: 8.13.1. Thanks.
A Journey In The Quest Of Knowledge
2 REPLIES 2
Rajeev  Shukla
Honored Contributor

Re: Sendmail Relay Question

What i feel like is relaying is disabled in sendmail until you enable the smart-relay and specifiy the hosts and domains the sendmail recieves the mail from by specifying in local-host-names file. Also you could edit /etc/mail/relay-domains to specify the domains for which this sendmail host acts as relay.
To check if they relay is enabled do a telnet to this host on port 25 and try sending a main to external domain and see if it gets relayed.

Now by changing the
0 MaxHopCount=0
you are going to discard all the mails that have hop count more than 0. Which could mean any mail coming to this host having more than 0 ho count will be rejected. So depending on your setup i dont know if thats helpfull to you.
morganelan
Trusted Contributor

Re: Sendmail Relay Question

comment the DS in sendmail.cf file such as:

# DS and
# 0 TryNullMXList



Kamal Mirdad