Disable sendmail in VPS?

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
Is there any way to disable sendmail completely on my VPS server? and restore it if I don't want to disable this function any more.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Depends on which Linux distribution you are using but try this

To disable

/etc/init.d/sendmail stop

To Restart

/etc/init.d/sendmail start
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Yes they will work with CentOs 6.x if you have sendmail installed.
 

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
..if you have sendmail installed.
Sorry where or how to check sendmail insatlled on my vps?

You can block the port 25 in the server using firewall or iptables
This way may be easier. how can I block port 25? and it is possible to restore it?

I have to ask way to restore because I only want to block for a while now. Sometimes I can want to roll back the default setting.
 

Vishnu

Active member
Registered
Joined
Jan 3, 2017
Messages
77
Points
8
If you are using cPanel you can Install CSF Firewall and block the Port in CSF > Server configuration

or

Using IPtables you can do it by below command :
iptables -A INPUT -s 0.0.0.0 --dport 25 -j DROP
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
You can use ps -e | grep sendmail to see if a process called sendmail is running.

You can just block port 25 as Vishnu suggested but this will block any connection to port 25 and no mail servers will be able to connecting to your server to deliver mail on port 25
 
Older Threads
Replies
26
Views
22,854
Replies
8
Views
8,986
Replies
3
Views
5,188
Replies
2
Views
2,902
Replies
5
Views
4,078
Newer Threads
Replies
5
Views
2,891
Replies
9
Views
8,950
Replies
3
Views
2,922
Replies
4
Views
4,265
Latest Threads
Replies
0
Views
123
Replies
1
Views
79

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top