LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-02-2009, 10:30 AM   #1
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Rep: Reputation: 30
How do I limit which domains sendmail can send to?


I need to limit sendmail from sending mail to anyone but our domain. I do not administer our corporate firewall or routers. I'm sure this is an easy fix but I haven't found it yet.
 
Old 10-02-2009, 10:58 AM   #2
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 141

Rep: Reputation: 16
make it entry in host.allow file...whome u want or deny..
 
Old 10-02-2009, 11:19 AM   #3
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by abhijeetdutta View Post
make it entry in host.allow file...whome u want or deny..
I want to limit which domains sendmail can send mail to, are you sure the above will do so? It doesn't look like it to me.
 
Old 10-02-2009, 11:26 AM   #4
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by bax View Post
I want to limit which domains sendmail can send mail to, are you sure the above will do so? It doesn't look like it to me.
No, the above will certainly won't do that.
It defines the hosts that can connect to a service (if you use gentoo tcp-wrappers should be installed and the tcpd use flag should be set for this).

But that is not what you want.
 
Old 10-02-2009, 11:31 AM   #5
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
hosts.allow and hosts.deny simply limit hosts connecting to the machine, not which domains sendmail can send to.

I got webmin up on said sendmail box; any ideas on how to accomplish what I need done?
 
Old 10-02-2009, 11:31 AM   #6
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 141

Rep: Reputation: 16
i am not geeting your question..as per my concerned what i have done in my organistion recently it will like be this [(hostname or ip) (name.domain.com)] or domainname: ALL EXCEPT .domain
 
Old 10-02-2009, 11:47 AM   #7
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
abhijeetdutta, what I'm trying to accomplish is setting the sendmail service to only be able to send mail to 2 domains. Not any other domains.
 
Old 10-02-2009, 12:00 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
This might help you
 
Old 10-02-2009, 12:19 PM   #9
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
jiml8, I did try that and it had the affect of keeping me fro msending any mail at all.

Surprised no one else has ran into this before.
 
Old 10-02-2009, 12:37 PM   #10
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 141

Rep: Reputation: 16
sorry i have not got your question earlier...just make it change in named.conf file where you want to relay your services...
there you can can change allow query too your internal domain only
 
Old 10-02-2009, 12:48 PM   #11
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
I'm not running BIND (not my network), will editing named.conf still work or do I have to go through setting up a BIND server?
 
Old 10-05-2009, 07:11 AM   #12
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Bumping this in hopes of someone shedding some light on the subject.
 
Old 10-05-2009, 09:21 AM   #13
bax
Member
 
Registered: Dec 2001
Location: NoVA
Distribution: Ubuntu, Solaris, OpenBSD
Posts: 492

Original Poster
Rep: Reputation: 30
Is there a way of doing this with iptables?
 
Old 10-05-2009, 11:13 AM   #14
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by bax View Post
Is there a way of doing this with iptables?
Yes, just block outgoing traffic on the relevant ports to the relevant destinations. This solution requires that the destinations have fixed IPs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent to send mails to public domains in sendmail mail2mphani Linux - Security 1 03-11-2009 12:37 PM
sendmail - how to send mail from multiple domains? neocontrol Linux - Server 1 05-14-2007 02:18 AM
Limit Browser to specific domains whayford Linux - General 5 05-31-2006 07:49 AM
Is there a hard limit to virtual domains? kuplo Linux - Software 6 11-10-2005 03:50 AM
Sendmail: How can I avoid some users send mail to outside domains? lordphantom82 Linux - Software 0 11-16-2004 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration