Operating System - Linux
1828504 Members
2699 Online
109978 Solutions
New Discussion

how to restrict local user sending external mail?

 
qmesbah
New Member

how to restrict local user sending external mail?

how can i restrict some of my local user to send external mail but shloud be able to send internally and receive both internal nad external mail using sendmail.
3 REPLIES 3
Patrick Van Humbeeck
Valued Contributor

Re: how to restrict local user sending external mail?

Jerome Henry
Honored Contributor

Re: how to restrict local user sending external mail?

You can also use an IPtables rule, if you set one up :

(assuming your internal network is 10.0.0.0/24) :

iptables -A input -s 10.0.0.0/24 -d 10.0.0.0/24 -dport 25 -j ACCEPT #accepts packets coming from your internal net to your internal net, and asking for port 25
iptables -A input -s 10.0.0.0/24 -dport 25 -J DROP # refuses packets coming from your internal net and going elsewhere for port 25

You can also improve this of course using ports 110 and 143 if required (pop and imap).

hth

J
You can lean only on what resists you...
qmesbah
New Member

Re: how to restrict local user sending external mail?

Thanks Patrick & Henry,
i had tried -http://www.sendmail.org/~ca/email/restrict.html
but don't know why it's not working. there is no error message.
Patrick, would you please tell me where should i make change in these rules.