Hi all, I built an ISPConfig 3.3 extension that adds per-mailbox and global email send rate limiting, and I would like to share it with the community. What it does - Per-email-address daily send limit (e.g. 100 emails/day per mailbox) - Global server-wide daily cap (default 999 emails/day across all mailboxes) - Fail-safe design: if the daemon or DB fails, Postfix gets DUNNO so mail never stops flowing - Counts both port 587 submission and port 25 authenticated webmail traffic Why CLI-only v1 This version does not modify any original ISPConfig panel files. Install and uninstall are performed from the command line, so it is safe for production servers where you do not want to patch core ISPConfig PHP files. How it works - Python policy daemon listens on 127.0.0.1:10040 - Postfix mua_sender_restrictions and smtpd_sender_restrictions call check_policy_service - Daemon checks er_global_ratelimit first, then er_mail_user_ratelimit - Atomic counters via MariaDB INSERT ... ON DUPLICATE KEY UPDATE - Daily reset via cron job at 00:01 Screenshots 1. Mailbox Rate Limit tab on Email Mailbox edit — 1.png 2. Global server Email Rate Limit admin tab — 2.png 3. Per-user daily limit error in ISPConfig webmail — 3.png 4. Same per-user limit error in Roundcube window — 4.png 5. Mailbox Rate Limit tab after the limit was hit — 5.png 6. Global Email Rate Limit tab showing recent violations — 6.png 7. Global limit error in ISPConfig webmail — 7.png 8. Same global limit error in Roundcube window — 8.png Files - email_ratelimit_v1.zip — extension package - install_email_ratelimit_v1.sh(install_email_ratelimit_v1.zip <- unzip) — standalone installer Quickinstall scp email_ratelimit_v1.zip install_email_ratelimit_v1.sh root@yourserver:/root/ ssh root@yourserver cd /root chmod +x install_email_ratelimit_v1.sh ./install_email_ratelimit_v1.sh Then log out and back into ISPConfig. Uninstall cd /usr/local/ispconfig/extensions/email_ratelimit php -r "require 'install/installer.php'; \$i = new email_ratelimit_installer(); \$i->disable(); \$i->uninstall();" mysql -u root -p dbispconfig < install/uninstall.sql rm -rf /usr/local/ispconfig/extensions/email_ratelimit License: MIT Created with: AI coding assistance from Kimi K2.6 and Kimi K2.7-code Feedback, bug reports, and pull requests welcome.
ISPConfig uses Rspamd, and Rspamd has email rate-limiting support built in. Instead of writing your own quota daemon, I would have used what's there and configured Rspamd to do the job, as it's mature software already present on any recent ISPConfig installation.
No, it's not exposed in the GUI. But it would have been probably easier, safer, and less resource usage if you had just added a form to configure it in the GUI and let your extension write the matching config files instead of writing a new daemon. There should also be several threads here in the forum on that topic as I know that several users are using Rspamd-based email quotas on their ISPConfig systems.