Disable sending of emails from server

kaon

Verified User
Joined
Aug 7, 2008
Messages
42
Dear All,

I went to disable sending of emails from server.
People can receive emails but i do not want them to send emails.
I mean everyone, not just one user.

I will add mail() function in the disabled_functions list which will take care of php sending.
I have already removed squeerilmail and roundcube.

All i need your help is in disabling exim or any SMTP service running on the server.
If i stop exim from services section will this take care of it or I need to do something else.

I dont do commercial hosting so i can have that.

Please help.
 
Sorry i forgot to mention, i am using latest DA and I am on CentOS 6.5

I also want to permanently disable proftpd. The issue is when i stop this service, DA automatically start it after some hours. I fear same with exim service. I searched but couldnt find something like this, there are articles about email limits or per customer but not what i want.

Please help.
thanks
 
You should not completely remove exim, because you'll need it to receive email and because your server occasionally uses it to send email.

You can make changes to exim.conf so it won't allow authenticated logins, or even to exim.pl, for more cmplex solutions, thus disabling it for outgoing email. I'm not sure exactly what you'll need to do but hopefully someone else will post here to help you if you can't figure it out for yourself.

You can keep DirectAdmin from re-enabling ftp, exim, and/or other stupped daemons, by stopping them in the DirectAdmin interface. Then DirectAdmin shouldn't restart them.

And note that even if exim isn't running as a daemon, it can still be called through the sendmail interface to send email.

Jeff
 
Thanks a lot for your reply.
I will check it and update you.
 
Note I've just added a new paragraph at the bottom of my reply #3.

Jeff
 
And note that even if exim isn't running as a daemon, it can still be called through the sendmail interface to send email.
Jeff

Oh this is bad. How can i stop SMTP than. Use iptables and block port 25...?

Code:
# IPTABLES -A INPUT -p tcp --dport 25 -j REJECT
 
Last edited:
The sendmail interface doesn't connect to your mailserver to send email by using SMTP, it connects directly. In fact the default exim.conf file distributed with DirectAdmin doesn't allow SMTP connections on localhost, though the default I distribute does (simple difference of opinion :)).

You can rename sendmail, or even rename exim (after turning it off through the DirectAdmin control panel) but then your server won't be able to send important server emails either.

Jeff
 
The sendmail interface doesn't connect to your mailserver to send email by using SMTP, it connects directly. In fact the default exim.conf file distributed with DirectAdmin doesn't allow SMTP connections on localhost, though the default I distribute does (simple difference of opinion :)).

You can rename sendmail, or even rename exim (after turning it off through the DirectAdmin control panel) but then your server won't be able to send important server emails either.

Jeff

I will try to edit sendmail process.
I need it to send important emails from server incase of issues.
 
I believe the sendmail interface is just a link to exim, but I suppose you can coinvert it to a script which will call exim with the correct parameters only if the email isn't from end-users, but rather from server processes.

Jeff
 
Back
Top