Operating System - HP-UX
1842349 Members
3261 Online
110188 Solutions
New Discussion

Re: Can sendmail be configured to accept only e-mail from certain domains?

 
SOLVED
Go to solution
James A. Donovan
Honored Contributor

Can sendmail be configured to accept only e-mail from certain domains?

So far, I've been lucky enough to be able to avoid having to run sendmail, and needing to deal with all of it's related security issues. Unfortunately for me, that's about to change....

I need to know if it's possible to limit sendmail to accepting connections only from a select few domains. It seems to me that it should be possible, but I'm just not familiar enough with sendmail to know what's needed.

Pointers to clear documentation on the subject would be appreciated. Meanwhile, I'm heading off to sendmail.org to root around there for some answers....
Remember, wherever you go, there you are...
3 REPLIES 3
Geoff Wild
Honored Contributor
Solution

Re: Can sendmail be configured to accept only e-mail from certain domains?

Hmnmmmmnmmm...

You could use the access db...

/etc/mail/access


in the access file, add the domains you want to accecpt from, and block all ip's from the class A level (note it is a tab between ip/domain and reject/OK):


gooddomain.com OK
anotherone.com OK
1 reject
2 reject
.
.
.
254 reject



makemap hash /etc/mail/access

restart sendmail...


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dave Olker
Neighborhood Moderator

Re: Can sendmail be configured to accept only e-mail from certain domains?

I looked in the O'Reilly sendmail book - Second edition - and found on page 289 there is a heading called "Accept Mail Only From Our Domain." It may provide the feature you're looking for.

Good luck,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Steven E. Protter
Exalted Contributor

Re: Can sendmail be configured to accept only e-mail from certain domains?

Goeff's solution will work just fine for you.

You'll need a macro script for HP-UX to build your sendmail.cf file.

http://www.hpux.ws/buildmail.hpux.text

You will cut down a lot on your spam.
I wish I could do that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com