Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    144
    cPanel/Enkompass Access Level

    Website Owner

    Default Way to throttle email sending via .php scripts ?

    Hello,
    Is it a way to limit the number of emails sent via .php scripts or/and throttle this emailing speed cause in the case of spamer the server load hit the roof. Seems number of emails per hour limit is not working in this case of script emailing.



    Thanks,

  2. #2
    Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    556
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default webhost gear to the rescue

    simple google search came up w/ this -

    http://www.webhostgear.com/index.php?art/id:232

    PHP and Apache has a history of not being able to track which users are sending out mail through the PHP mail function from the nobody user causing leaks in formmail scripts and malicious users to spam from your server without you knowing who or where.

    Watching your exim_mainlog doesn't exactly help, you see th email going out but you can't track from which user or script is sending it. This is a quick and dirty way to get around the nobody spam problem on your Linux server.

    If you check out your PHP.ini file you'll notice that your mail program is set to: /usr/sbin/sendmail and 99.99% of PHP scripts will just use the built in mail(); function for PHP - so everything will go through /usr/sbin/sendmail =)

    hope that helps



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  3. #3
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    942
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Possibly a good concept idea, but in my server, my /usr/sbin/sendmail is a binary file, and this solution cannot be accomplished since it's non editable using pico.
    Is there any other solution? I'm also interested in checking that nobody is actually somebody.
    Regards

  4. #4
    Member
    Join Date
    Sep 2006
    Posts
    144
    cPanel/Enkompass Access Level

    Website Owner

    Default

    Hello,
    I do not like to track them cause I know who is sending. The aim is to limit them not to overload the server and SPAM before I shut them down. Throttling or/and limit as number per hour.



    Thanks,

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by WebHostDog View Post
    Hello,
    Is it a way to limit the number of emails sent via .php scripts or/and throttle this emailing speed cause in the case of spamer the server load hit the roof. Seems number of emails per hour limit is not working in this case of script emailing.



    Thanks,
    I remember a similar thread on WHT this morning. Is the user sending mail using standard SMTP or mail() calls or are they bypassing your SMTP server entirely?

    The SMTP Tweak (WHM -> Security -> Security Center -> SMTP Tweak) will curb malicious users from bypassing your SMTP server.

  6. #6
    Member
    Join Date
    Sep 2006
    Posts
    144
    cPanel/Enkompass Access Level

    Website Owner

    Default

    Hello,
    They are sending via .php script with mail function. I am using CSF and LFD. LFD blockes the folder but after it run (every 5 min.). Till then they can send as many emails as they like.



    Thanks,

  7. #7
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by WebHostDog View Post
    Hello,
    They are sending via .php script with mail function. I am using CSF and LFD. LFD blockes the folder but after it run (every 5 min.). Till then they can send as many emails as they like.



    Thanks,
    Odd, typically the mail function routes mail through the SMTP server (by way of sendmail emulation) in a cPanel/WHM environment.

  8. #8
    Member
    Join Date
    Sep 2006
    Posts
    144
    cPanel/Enkompass Access Level

    Website Owner

    Default

    Hello,
    Yes thats what I am saying if the limit per user or domain works as I have set it in WHM would not be a problem. But seems it is not cause he has sent thousands of emails.


    Thanks,

Similar Threads & Tags
Similar threads

  1. see which php scripts are sending mail?
    By alexmack in forum Security
    Replies: 5
    Last Post: 08-26-2010, 11:23 PM
  2. CGI scripts not sending email, php scripts will
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-17-2006, 04:20 AM
  3. cron, php and email not sending
    By tgavin in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-17-2006, 04:27 PM
  4. Sending EMail through exim with php from site
    By earthquakie in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-27-2006, 01:39 PM
  5. /scripts/upcp stopped sending email since April 24th midnight
    By bwwt in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-04-2005, 05:54 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube