These are only basic limits, that are valid for entire host-domain. These can be set fairly high, if you really need that. Later on, you can impose other limits with some milter filters.
Current values can be seen with:
postconf | grep 'mailbox_size_limit\|message_size_limit\|virtual_mailbox_limit'
Default values are:
postconf -d | grep 'mailbox_size_limit\|message_size_limit\|virtual_mailbox_limit'
Edit values with:
postconf -e 'message_size_limit = 104857600'
This changes /etc/postfix/main.cf confguration file. Mine values are:
# 100 Mb message_size_limit = 104857600 # 1 Gb mailbox_size_limit = 1073741824 virtual_mailbox_limit = 1073741824
Milters I’ve found while looking for mail throttling
Best milters that I found, excluding the ones that provide graylisting functionality, were:
- j-chkmail: Multipurpose mail filtering software.
- Milter-regex: Reject mail matching regular expressions. Simple and can be usefull.
- Mailfromd: General-purpose mail filtering daemon. It looked too complicated for me.
- milter-limit: Limit number of mails, per sender. Looks like it has not enough documentation.
- milter-length: Limiting mails by message size.
But, milters are native for Sendmail, not Postfix (but they work in latest Postfix). Analog solution for Postfix is to use some Policy Daemon:
- postfix_policy: It has a web interface as a plus. This looks logical to me, because it allows a administrator to configure in an easy way.
- postfwd: The configuration looked the simplest to me. S I decided to go with this one.
- ACL Policy Daemon: Apolicyd (Python) does have message size limiting, but does not have message count (rate-limiting or throttling) control. And, according to this post, it is very heavy on the server load. So, it’s out.
These are actively maintained, and Policyd-weight is not active anymore. Finally, I decided to go for Postfwd.