centos - how to disable sendmail / clientmqueue?

5,074

Your best bet is to simply redirect root's mail via /etc/aliases. Pick another address that can handle the mail volume. Failing that, redirect it to /dev/null. Sendmail can be shutdown and not impact PHP sending mail, assuming that the PHP pages are written to talk to a specific external SMTP server. If they simply send mail without specifying a server to connect to, they end up relaying through localhost, so shutting down sendmail locally would cause the PHP scripts to fail.

Share:
5,074

Related videos on Youtube

Joe
Author by

Joe

Updated on September 18, 2022

Comments

  • Joe
    Joe almost 2 years

    Our server's /var/ direction keeps filling up due to sendmail sending email to root (the /var/spool/mail/root was 2GB).

    All our sites scripts use external smtp servers for sending email so we'd like to disable sendmail on the server to avoid this issue happening again as each time the directory fills up mysql shuts down because it can't write to the /var/log/ directory as it's out of space.

    Is there any way to safely shutdown sendmail that won't affect php connecting to external smtp? I'm not sure if sendmail is used for that.

    Or perhaps someone knows of a way to disable sendmail from sending email to root no matter what.