Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to block sendmail access to particular users
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to block sendmail access to particular users

DrukpaDrukpa Member

Chinese/Russian spammers are making my life miserable by exploiting vulnerable wordpress/joomla plugins and themes, and then sending spam.

Got my IP blacklisted by spamhaus yesterday.

Stupid cpanel not having an option to restrict mail for specific users isn't helping matters at all. The most I can do is, rate-limit the hourly emails to 1. Have also used the /etc/blockeddomains and exim configuration, but not sure if it works properly.

I use suphp, running php scripts as the users. So, is there a way to block sendmail/smtp acces s to specific users? How do you guys handle outgoing spam for shared hosting (besides using smarthosts and other third party filtering).

I wonder how these ****ing spammers/scammers get to dupe anyone. Everyone hates spam and can easily identify one nowadays.

Comments

  • Wordpress. I recently had to roll back to an earlier instance and reinstall what went missing. Then install a new theme. Yes, shared hosting so not a lot of control, but that's the trade-off.

    Do you actually need to have users?

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    You should look into writing a sendmail wrapper.

    I ended up putting one together one evening and it's done some serious work:

    (04:03:51) lv-shared01:~ root: wc -l /var/log/sendmail_wrapper.log
    8180900 /var/log/sendmail_wrapper.log
    

    That's in less than a month.

    It pretty much tracks who calls /usr/sbin/sendmail and compares it to a whitelist. It's heavy handed to say the least, but given 99%+ of the people on BuyShared don't need sendmail, it isn't all that bad. Users can ticket in and get added to a whitelist as well.

    Francisco

  • FlamesRunnerFlamesRunner Member
    edited June 2015

    modprobe ipt_owner

    Add this to the end of a iptables statement:
    -m owner --uid-owner useridyouwishforthisruletoapply

    Similarly, you can switch uid with gid.

    1. Add 'mail' in php's disable_functions for client/domain, or
    2. Remove 'sendmail_path' in php.ini/php-fpm.conf for client/domain, or
    3. Modified sendmail using sendmail-wrapper and add logic for detect sendmail come from
  • SadySady Member

    @mustafaramadhan said:
    1. Add 'mail' in php's disable_functions for client/domain, or
    2. Remove 'sendmail_path' in php.ini/php-fpm.conf for client/domain, or
    3. Modified sendmail using sendmail-wrapper and add logic for detect sendmail come from

    This..

Sign In or Register to comment.