How to setup a host as a sendmail relay for particular IP subnet
Posted
by Abhinav
on Server Fault
See other posts from Server Fault
or by Abhinav
Published on 2009-07-31T10:32:19Z
Indexed on
2010/03/26
13:03 UTC
Read the original article
Hit count: 499
sendmail
Hi,
By default, sendmail (I have version 8.13 on an RHEL4) allows only local mails.
I wanted to allow mails from a particular network to be relayed via the system, so I did the following based on suggestions from various places :
- /etc/mail/access : Added the subnet and the domain 8.37 RELAY mydomain.com RELAY (I assume this is the originating email's domain)
This alone did not work, so I added the following to sendmail.mc FEATURE(access_db)dbl
Now, the problem is that it is allowing access from other domains as well. To test it out, I removed 8.37 RELAY from the access, and changed the email from field to [email protected]
However, I still receive the mail.
What is the correct way to configure this, so that only mails from a particular subnet are relayed ?
© Server Fault or respective owner