Skip to main content

Hourly/daily limit for SMTP

Comments

13 comments

  • 24x7ss
    Correct, you can setup limit for sending mail per hour per domain. Check below link: Setup limit of sending out mails per hour per domain users You can set SMTP restriction How to Prevent Email Abuse - cPanel Knowledge Base - cPanel Documentation
    0
  • postcd
    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.
    0
  • cPanelMichael
    Hello, Yes, you can limit the number of messages users can send out via SMTP, however it's on a per-domain basis: How to Prevent Spam with Mail Limiting Features - cPanel Knowledge Base - cPanel Documentation If I understand correctly, you want to apply this limit to the sender's IP address instead of the domain name itself. That's not currently possible through an option in cPanel. Is the domain-based limit not suitable, or not working as expected? Thank you.
    0
  • ebizindia
    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!
    0
  • postcd
    @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.
    0
  • cPanelMichael
    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.

    It's possible, per the instructions at: How to Prevent Spam with Mail Limiting Features - cPanel Knowledge Base - cPanel Documentation
    thanks for the link, but i can't find "smtp" phrasse on that page.

    Yes, these options apply to outgoing emails, sent via the SMTP protocol. Thank you.
    0
  • ebizindia
    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.
    0
  • postcd
    I want to restrict the email user account xyz@example.com[/EMAIL] to sending max. 100 emails per hour. This is not the domain user.

    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)
    0
  • cPanelMichael
    Hello, It's not yet possible to limit email on a per-email-account basis, however the feature request @postcd mentioned is open to add support for that functionality: Mail sending limits per email account (rather than per domain) Please add feedback and vote for the feature if it's something you want to see implemented. Thanks!
    0
  • garconcn
    We are using CSF firewall Relay Tracking to achieve this. Relay Tracking. This allows you to track email that is relayed through the server. There are also options to send alerts and block external IP addresses if the number of emails relayed per hour exceeds configured limits. The blocks can be either permanent or temporary.
    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
    0
  • Shoss
    Hi @garconcn Does this solution still work, or there is a better solution now?
    0
  • garconcn
    Hi @garconcn Does this solution still work, or there is a better solution now?

    Yes, it still works
    0
  • Shoss
    Hi @garconcn , Pardon my ignorance. I have set up Relay tracking in CSF. I am not sure whether the limits are on a per domain, or cPanel user or client IP. Also, the script you shared seemed to be restricting emails sent to per recipient, 100 emails per hour per recepient. It does not limit a sender to send more than 100 emails to more than 100 recipients, am I correct?
    0

Please sign in to leave a comment.