Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2006
    Posts
    520

    Limiting PHP emails per hour

    Hello,

    On an cPanel + RHEL 5.3 box at WHM - Tweak Settings, I activated "The maximum each domain can send out per hour (0 is unlimited)" and set that value to "300".

    But, it seems that this limit is only if the user is sending using webmail or an email client, right now a joomla website is sending much more than 300 mails per hour, but it's using php to send the mails.

    My question, how can I limit emails per hour on each domain while sending from php?

    Code:
    29457 username  20   0 29724  13m 5848 R 10.2  0.2   0:00.10 /usr/bin/php /home/username/public_html/index.php
    Any suggestions are appreciated.

    THanks!
    Last edited by sh4ka; 07-29-2009 at 08:07 AM.

  2. #2
    Join Date
    May 2009
    Location
    On a Speck!!!!!
    Posts
    216
    Hello,

    I think you might have mistaken. If you have set the value as 300 in your WHM it will restrict the number of emails send from a particular domain per hour even if it is using any mailing scripts. Actually the changes are server wide.

    Can you confirm this once again?

  3. #3
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    565
    Quote Originally Posted by sh4ka View Post
    Hello,

    On an cPanel + RHEL 5.3 box at WHM - Tweak Settings, I activated "The maximum each domain can send out per hour (0 is unlimited)" and set that value to "300".

    But, it seems that this limit is only if the user is sending using webmail or an email client, right now a joomla website is sending much more than 300 mails per hour, but it's using php to send the mails.

    My question, how can I limit emails per hour on each domain while sending from php?

    Code:
    29457 username  20   0 29724  13m 5848 R 10.2  0.2   0:00.10 /usr/bin/php /home/username/public_html/index.php
    Any suggestions are appreciated.

    THanks!
    You would need to use SuPHP so that the emails are associated with a cPanel user (and thus a domain).
    David Grega
    cPanel Technical Product Specialist

  4. #4
    Join Date
    Apr 2006
    Posts
    520
    I'm already using suPHP. Anyway, I think it was the fact that the domain was listed at /var/cpanel/maxemails, removed from there, ran /scripts/build_maxemails_config and now i just have to test it.

    Thanks!

  5. #5
    Join Date
    Apr 2006
    Posts
    520
    Well... server is using suPHP since months ago, yesterday removed the domain from /var/cpanel/maxemails, ran /scripts/build_maxemails_config but problem stills. One particular today sent over 10k of emails from Joomla using php.

    Any other suggestions are appreciated.

    Thanks.
    Last edited by sh4ka; 07-30-2009 at 07:02 AM.

  6. #6
    Join Date
    Jul 2009
    Posts
    178
    disable mails sent as nobody via WHM > Tweak settings >

  7. #7
    Join Date
    Apr 2006
    Posts
    520
    That probably will stop everybody sending mails from PHP, not just this site... it's not a choice right now.

    Thanks anyway.

  8. #8
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    565
    Quote Originally Posted by sh4ka View Post
    That probably will stop everybody sending mails from PHP, not just this site... it's not a choice right now.

    Thanks anyway.
    If you are using SuPHP, then PHP scripts should not be sending email as user nobody. If you are using both SuPHP and SuExec, no legitimate email should be going out from user nobody.
    David Grega
    cPanel Technical Product Specialist

Similar Threads

  1. how many emails can be reasonably sent per hour?
    By Abu Mami in forum Hosting Security and Technology
    Replies: 3
    Last Post: 02-07-2008, 08:19 PM
  2. How Many Max Emails Per Hour....Should I Allow?
    By SupportRep911 in forum Dedicated Server
    Replies: 10
    Last Post: 07-29-2007, 11:32 PM
  3. switch max emails/hour
    By webstyler in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-30-2006, 10:04 AM
  4. Limiting size of emails sent with CPanel?
    By Mr Tech in forum Web Hosting
    Replies: 1
    Last Post: 11-17-2006, 06:33 AM
  5. Limiting emails user can send from there account
    By Duport in forum Hosting Security and Technology
    Replies: 3
    Last Post: 02-24-2005, 12:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •