Topic: Iredapd throttle setting priority issue
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 (Upgraded from 0.9.7)
- Linux/BSD distribution name and version: centos-release-7-5.1804.el7.centos.2.x86_64
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi,
My throttle setting as below:
Global setting: (Only apply outbound throttle)
Period of time: 21600
Max outbound: 250
Cumulative Max Size: 0 (unlimited)
Max Size in Single Mail: 15000000
Below setting applied to 1 particular email account: (postmaster@xxx.com)
Period of time: 21600
Max outbound: 0 (unlimited)
Cumulative Max Size: 0 (unlimited)
Max Size in Single Mail: 15000000
===============================
With above setting, max oubound message for postmaster@xxx.com should be unlimited.
However, i check the iredapd log it is still showing postmaster@xxx.com max_msgs = 250
This is the log:
2018-08-21 09:10:53 DEBUG [SQL] Query throttle setting:
SELECT id, account, priority, period, max_msgs, max_quota, msg_size
FROM throttle
WHERE kind='outbound' AND account IN ('192.168.1.27', '@ip', 'postmaster@xxx.com', '@xxx.com', '@.', '192.168.1.*', '192.168.*.27')
ORDER BY priority DESC
2018-08-21 09:10:53 DEBUG [SQL] Query result:
[(4L, 'postmaster@xxx.com', 10, 21600L, 0L, 0L, 0L), (1L, '@.', 0, 21600L, 250L, 0L, 15000000L)]
2018-08-21 09:10:53 DEBUG sender throttle setting: max_msgs=250/id=4/account=postmaster@xxx.com;
msg_size=15000000 (bytes)/id=1/account=@.;
Look at the throttle.py source code, it seems like bypassing the higher priority setting if the value of max_msg is "0" (unlimited)
Source code:
if continue_check_max_msgs and _max_msgs > 0:
continue_check_max_msgs = False
t_settings['max_msgs'] = {'value': _max_msgs,
'period': _period,
'tid': _id,
'account': _account,
'track_key': [],
'expired': False,
'cur_msgs': 0,
'cur_quota': 0,
'init_time': 0}
t_setting_keys[(_id, _account)].append('max_msgs')
tracking_sql_where.add('(tid=%d AND account=%s)' % (_id, sql_user))
throttle_info += 'max_msgs=%(value)d/id=%(tid)d/account=%(account)s; ' % t_settings['max_msgs']
Right now, what my workaround for this is to set Max outbound 999999 for the postmaster@xxx.com
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.