Results 1 to 14 of 14
-
07-02-2009, 07:30 AM #1Newbie
- Join Date
- Nov 2007
- Posts
- 18
How to disable sendmail completely?
Is there any way to have sendmail completely disabled on my server?
I tried:
service sendmail stop
but my maillog keeps filling up with a lot of messages like these:
stat=Deferred: Connection refused by [127.0.0.1]
How can I stop the maillog from filling up?
-
07-02-2009, 08:14 AM #2WHT Addict
- Join Date
- Aug 2002
- Location
- Canada!
- Posts
- 161
You can try:
rpm -e sendmail
or
yum remove sendmail
-
07-02-2009, 09:41 AM #3Web Hosting Master
- Join Date
- Jul 2005
- Location
- New Jersey, US
- Posts
- 1,597
What control panel are you using? If you are using cpanel, then sendmail is really just exim, so you can just remove the sendmail file to disable it
PlatinumServerManagement (also known as PSM)
The OLDEST and LARGEST and MOST TRUSTED server management provider in the USA, with 15+ employees and growing!
Providing quality support for OVER 21 years! Currently supporting over 3,000+ servers monthly!
www.PlatinumServerManagement.com Proud member of the NJ BBB & Chamber of Commerce & Authorized cPanel Partner.
-
07-02-2009, 12:39 PM #4Web Hosting Master
- Join Date
- Oct 2007
- Posts
- 2,349
The log message itself says that sendmail is stopped and disabled. System logs the activities with syslogd daemon so you may have to disable mailing logs from syslog.conf file.
www.24x7servermanagement.com
Server Management, Server Security, Server Monitoring.
India's Leading Managed Service Provider !! Skype: techs24x7
-
07-03-2009, 08:32 AM #5Temporarily Suspended
- Join Date
- Jul 2009
- Location
- SLASH ROOT
- Posts
- 26
Try this : which sendmail
This should give you the "sendmail" binary's path. Change the permissions to "0000" and the ownership to "root".
----------------------------
chmod 0000 <path_to_sendmail>
chown root.root <path_to_sendmail>
----------------------------
That should disable sendmail. This way there should not be any dependency issues later on. Just keep in mind the current permissions and ownerships.
---------------------------
Systems Engineer
WHRSS
We grow by helping you grow.
-
07-03-2009, 08:53 AM #6PING PONG
- Join Date
- May 2009
- Location
- SLASH ROOT
- Posts
- 867
If you are having Cpanel, then its using Exim's binary as PSM said.
If you don't have a CP, check if sendmail is a StandAlone server or not. If it isn't then it will be running under 'xinetd'.
Paste the result of "netstat -plan| grep :25" so that I can confirm.█ WebHostRepo.com
█ Linux | Windows | VPS | Cloud
█ Outsourced Technical Support since 2009
█ sales@webhostrepo.com
-
07-04-2009, 02:15 AM #7Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Ontario, Canada
- Posts
- 324
First of all, which OS are you using?
For CentOS do chkconfig sendmail off; service sendmail stop
For other operating systems the commands would be different.Shared Hosting / Reseller Hosting / Email Hosting
Dedicated Servers / Unmetered Servers / Linux & Windows VPS
DME Hosting, LLC [http://www.dmehosting.com]
-
07-04-2009, 05:07 AM #8Newbie
- Join Date
- Nov 2007
- Posts
- 18
I'm on CentOS and not using a cpanel.
Thanks, I've disabled it and stopped it from appearing in /var/log/maillog
but in /var/log/httpd/error_log I still get these messages:
"sh: /usr/sbin/sendmail: No such file or directory"
What can I do so that it stops logging to the httpd errorlog?
-
07-04-2009, 06:25 AM #9PING PONG
- Join Date
- May 2009
- Location
- SLASH ROOT
- Posts
- 867
Seems like some codes (html/php) are still seeking sendmail to send mails via 'http'.
Can you paste the full apache logs?█ WebHostRepo.com
█ Linux | Windows | VPS | Cloud
█ Outsourced Technical Support since 2009
█ sales@webhostrepo.com
-
07-05-2009, 01:25 AM #10Newbie
- Join Date
- Nov 2007
- Posts
- 18
-
07-06-2009, 08:52 AM #11PING PONG
- Join Date
- May 2009
- Location
- SLASH ROOT
- Posts
- 867
If your WP domains has a mailing URL, then that may be configured to use sendmail SMTP since you are getting those errors in Apache error logs.
I asked for logs to see if we can get the full path of the file using it. If you still can't figure it out, hire a Server Admin for further help.█ WebHostRepo.com
█ Linux | Windows | VPS | Cloud
█ Outsourced Technical Support since 2009
█ sales@webhostrepo.com
-
07-06-2009, 04:30 PM #12Newbie
- Join Date
- Jul 2009
- Posts
- 5
Just remove or disable sendmail from startup in /etc/init.d.
-
07-06-2009, 05:11 PM #13Newbie
- Join Date
- Jun 2009
- Location
- Lima - Peru
- Posts
- 27
rpm -e sendmail
and try to remove log of sendmail.
-
07-06-2009, 06:02 PM #14Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
This thread made me cry so I am posting my input.
Someone who actually has a clue. That will work if its a centos based machine. Keep in mind if you rpm -e sendmail you may get dependencies. Yum remove will remove the dependencies but redhat enterprise usually does not have yum. If its debian you will need to use dpkg and if its freebsd you will have to disable it in rc.conf
If you actually read the error message you would have seen it is NOT exim, and it is actually sendmail.
Wrong.
Horrible advice. That is a hack to disable it. You will likely end up with other errors in the system when crons and what not try to access the binary and it gets a permissions error.
Sigh
Good advice.
you have a script somewhere that is trying send mail. Likely a php script trying to use the mail() function. Now that you have removed sendmail php is no longer able to access the binary which it thinks is there.
php -i |grep -i sendmail
will show the sendmail path.
You can try to symlink sendmail to the true binary to get the error to go away but it is not the correct fix. The correct fix would be to compile php without mail() features.
ln -s /bin/true /usr/sbin/sendmail
depending on how the system is configured it could be in a number of logs.
Decent answer
Decent answer.Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
Similar Threads
-
HELP: Sendmail process for users that does not have sendmail process...
By reamark in forum Hosting Security and TechnologyReplies: 2Last Post: 05-16-2006, 08:46 AM -
Adding subject to sendmail command line "echo hello world | /usr/sbin/sendmail"
By RackNine in forum Programming DiscussionReplies: 4Last Post: 01-08-2004, 04:40 AM -
Completely new
By TetsuoAkira in forum Running a Web Hosting BusinessReplies: 4Last Post: 10-08-2002, 04:13 PM -
sendmail/etc/mail/sendmail.cf: WARNING: dangerous write permissions
By Andrew Pakula in forum Dedicated ServerReplies: 5Last Post: 07-28-2002, 10:28 PM -
And now for something completely different!
By cbaker17 in forum Web Hosting LoungeReplies: 8Last Post: 02-16-2002, 08:04 PM