LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I limit which domains sendmail can send to? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-limit-which-domains-sendmail-can-send-to-759222/)

bax 10-02-2009 10:30 AM

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.

abhijeetdutta 10-02-2009 10:58 AM

make it entry in host.allow file...whome u want or deny..

bax 10-02-2009 11:19 AM

Quote:

Originally Posted by abhijeetdutta (Post 3705149)
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.

deadeyes 10-02-2009 11:26 AM

Quote:

Originally Posted by bax (Post 3705181)
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.

bax 10-02-2009 11:31 AM

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?

abhijeetdutta 10-02-2009 11:31 AM

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

bax 10-02-2009 11:47 AM

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.

jiml8 10-02-2009 12:00 PM

This might help you

bax 10-02-2009 12:19 PM

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.

abhijeetdutta 10-02-2009 12:37 PM

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

bax 10-02-2009 12:48 PM

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?

bax 10-05-2009 07:11 AM

Bumping this in hopes of someone shedding some light on the subject.

bax 10-05-2009 09:21 AM

Is there a way of doing this with iptables?

lutusp 10-05-2009 11:13 AM

Quote:

Originally Posted by bax (Post 3708352)
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.


All times are GMT -5. The time now is 01:00 PM.