The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hourly/daily limit for SMTP

Discussion in 'E-mail Discussions' started by postcd, Jul 29, 2016.

Tags:
  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    Hello,

    i can limit number of e-mails sent per domain or per cpanel account if im not wrong
    there are people who use SMTP to send out e-mail. Is the hourly limit valid also for SMTP?
    If not, how to limit amount of e-mail sent out via SMTP?

    Thank You
     
  2. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    Was not answer to my question. I was already aware about domain/account based mail limitting. Here im asking about SMTP only.

    Regarding mentioned "SMTP restrictions" feature, i think (per its description) this feature just stop people using external mailserver, not mine mailserver. My aim is to limit MY own mailserver abuse. So this is also not related feature i think.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    postcd likes this.
  5. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    72
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    I am also interested in this question. Here is a scenario:

    The account of the user xyz@example.com gets hacked. The account starts sending 1000s of emails. Now if I can restrict this user to 100 emails per hour (or any arbitrary limit), we can control spam burst to a great extent.

    I can understand this is not possible through Cpanel currently. can some other solution be worked out? I want to limit emails by 'From user' or 'Auth by' id, not IP or the entire domain.

    Thanks!
     
    postcd likes this.
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    @cPanelMichael, thanks for the link, but i can't find "smtp" phrasse on that page. My question was about SMTP and its limits. On that page is mentioned email/mail, but not sure if WHM authors mean also SMTP, please kindly respond accordingly or read my first post. Hope you can answer if SMTP is also limitted when i limit mail per account or per domain. Or how to limit it.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's possible, per the instructions at:

    How to Prevent Spam with Mail Limiting Features - cPanel Knowledge Base - cPanel Documentation

    Yes, these options apply to outgoing emails, sent via the SMTP protocol.

    Thank you.
     
    postcd likes this.
  8. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    72
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    Hi Michael

    I could not find an answer to my question on the link you provided. To reiterate, I want to restrict the email user account xyz@example.com to sending max. 100 emails per hour. This is not the domain user.
     
  9. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    Not sure if that is possible, but there is similar feature request. But its about replacing cpanel account e-mail limits by e-mail account limits, better would be to have both: Mail sending limits per email account (rather than per domain)
     
    cPanelMichael likes this.
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  11. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    8
    We are using CSF firewall Relay Tracking to achieve this.

    We also set ratelimit in Exim Advanced Editor under acl_not_smtp >> custom_begin_outgoing_notsmtp_checkall for script emails.

    # Ratelimit sender exceed 100 messages per hour
    warn

    ratelimit = 100 / 1h / per_rcpt / strict / $authenticated_id
    delay = ${eval: ${sg{$sender_rate}{[.].*}{}} - \
    $sender_rate_limit }s
    log_message = "Sender rate $sender_rate / $sender_rate_period - Delayed $authenticated_id"
    # Ratelimit sender end
     
Loading...

Share This Page