redirecting autoresponder from /usr/sbin/sendmail

zuronam

Member
Aug 2, 2016
9
2
53
Zimbabwe
cPanel Access Level
Root Administrator
Hi all

I'm running
  • CLOUDLINUX 7.2 x86_64 vmware
  • WHM 56.0 (build 32)


I've renamed my /usr/sbin/sendmail to something like sendmail_2 so that rogue scripts that send out malware will not be able to use my server to spam.

I see however that this breaks the autoresponder feature where I get errors like this :
Code:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |[I]/usr/local/cpanel/bin/autorespond [email protected] /home/domain/[/I].autorespond
    generated by [email protected]

The following text was generated during the delivery attempt:

------ pipe to |[I]/usr/local/cpanel/bin/autorespond [email protected] /home/recipientdomain/[/I].autorespond
       generated by [email protected] ------

sendmail: Not running with correct effective GID.  Is sendmail binary setgid mailtrap?
sendmail: Not running with correct effective GID.  Is sendmail binary setgid mailtrap?
What I would like to know is that is there a way to configure the autoresponder feature to use the renamed sendmail binary? So that only the autoresponder feature works with /usr/sbin/sendmail_2 not have it try to find xx/sendmail

The reason why I have renamed it is that if say a Joomla site gets hacked and uses sendmail to blast out a whole lot of messages - these messages are not controlled by exim which if it leads to my IP being blacklisted - my hosting provider will disconnect my whole account - which I am trying to avoid at any cost.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The reason why I have renamed it is that if say a Joomla site gets hacked and uses sendmail to blast out a whole lot of messages - these messages are not controlled by exim which if it leads to my IP being blacklisted - my hosting provider will disconnect my whole account - which I am trying to avoid at any cost.
Hello,

There are no native options that will allow you to use a different sendmail location with the AutoResponder feature. Have you considered blocking the "Mail" function of PHP with the disable_functions option in your global php.ini file? Also, the following document offers some additional tips to prevent email abuse:

How to Prevent Email Abuse - cPanel Knowledge Base - cPanel Documentation

Thank you.
 

zuronam

Member
Aug 2, 2016
9
2
53
Zimbabwe
cPanel Access Level
Root Administrator
Hi cPanelMichael,

Thanks for your response. I thought i would disable sendmail as part of my spam curtailing strategy, but this clearly breaks cpanel in more ways than just the autoresponder (all other server notifications apparently use this so changing it breaks quite a bit)

Thank for the feedback though,