Portal Home > Knowledgebase > Articles Database > Stop cpanelusername@hostname.tld from sending mail ?


Stop cpanelusername@hostname.tld from sending mail ?




Posted by nisamudeen97, 04-04-2015, 06:03 PM
My server is used for hosting CMS like wordpress and joomla, as most of the clients are using plugins and themes which are not being downloaded from authorized websites lots of spam mails are found being generated from self triggered spam bot scripts. I have managed to enable detailed exim log and I am able to find the exact script which has caused the issue each time. Meanwhile is it possible to stop these malicious scripts only from spamming What I want to do is stop mails which are being of the form "cpanelusername@hostname.tld" ? ie stop mailing from the scripts that are not using proper authentication to sent mails Is it possible with out disabling php mail () ? I am not supposed to use any kind of third party spam detection software’s. I have done all recommended things by cpanel to prevent email abuse url https://documentation.cpanel.net/dis...nt+Email+Abuse I need some mechanism in exim to stop this. Is it possible ?

Posted by acm_whr, 04-04-2015, 11:07 PM
Go to the location WHM >> Service Configuration >> Exim Configuration Manager Under the section filer, you'll see the file used by exim for filtering. Open that file from the backend of your server and add the below piece of code in the end. if first_delivery and ( (“$h_from:” contains “emailtoblock@domainname.com”) ) then fail endif Restart exim cheers

Posted by nisamudeen97, 04-07-2015, 03:00 PM
Hi, Thanks for the update. If I want to prevent each cpanel user from sending mail via scripts, I have to add the above if loop for all users in exim conf ? Please make it clear



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
MSSQL Server Attacks (Views: 621)
oktagone down? [Merged] (Views: 1782)
server4you.com down? (Views: 645)

Language: