1

Topic: iRedAdmin throttle now work!

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5.-1
- Linux/BSD distribution name and version: CentOS 6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? iRedAdmin-Pro-SQL 2.4.1
- Related log if you're reporting an issue:
====
Global throttle seemed did not work (outgoing limit 300 messages/day).
Duyhoang sent 15 k message this morning.
In the after noon I set for every domain (outgoing limit 300 messages/day).
And lieu.ntb sent 3k messages.

Thank for your help.

Post's attachments

iRedAdmin.png 186.43 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedAdmin throttle now work!

Please upgrade iRedAPD to iRedAPD-2.0, it fixes one critical issue in throttle plugin. As mentioned in ChangeLog:

        - plugins/throttle.py: Throttle plugin cannot handle email which has
          multiple recipients.
          Thanks to Andrea <info _at_ nili.ca> for the report.

If user sends one email with 10 recipients, old iRedAPD counts just 1 email. but iRedAPD-2.0 will correctly count it as 10.

3

Re: iRedAdmin throttle now work!

ZhangHuangbin wrote:

Please upgrade iRedAPD to iRedAPD-2.0, it fixes one critical issue in throttle plugin. As mentioned in ChangeLog:

        - plugins/throttle.py: Throttle plugin cannot handle email which has
          multiple recipients.
          Thanks to Andrea <info _at_ nili.ca> for the report.

If user sends one email with 10 recipients, old iRedAPD counts just 1 email. but iRedAPD-2.0 will correctly count it as 10.

Thank you very much.

4

Re: iRedAdmin throttle now work!

Please let us know whether iRedAPD-2.0 fixes your issue.

5

Re: iRedAdmin throttle now work!

ZhangHuangbin wrote:

Please let us know whether iRedAPD-2.0 fixes your issue.

I upgraded iRedAPD-2.0.
I enable "Throttle outbound mails"
"Period of time : 1 hour*
"Number of max outbound emails : 10"

I tested by send email from one account from local domain to another account from local domain . I send by to 11 email.
What's problem I get.
Thanks

6

Re: iRedAdmin throttle now work!

dudd wrote:

I tested by send email from one account from local domain to another account from local domain . I send by to 11 email.
What's problem I get.

Please turn on debug mode in iRedAPD first, restart iredapd service, then send testing email again. Show us full log in iredapd log file related to your 11 email. (or, you can set the number of max outbound email to 1, then show us log of 2nd email)

7

Re: iRedAdmin throttle now work!

ZhangHuangbin wrote:
dudd wrote:

I tested by send email from one account from local domain to another account from local domain . I send by to 11 email.
What's problem I get.

Please turn on debug mode in iRedAPD first, restart iredapd service, then send testing email again. Show us full log in iredapd log file related to your 11 email. (or, you can set the number of max outbound email to 1, then show us log of 2nd email)

I set the number of max outbound email to 1 and show :

[root@mx1 ~]# tail -f /var/log/iredapd/iredapd.log
2017-02-27 20:21:34 DEBUG Session ended.
2017-02-27 20:21:34 INFO 127.0.0.1 END-OF-MESSAGE, admin@xxx.xx => dinhdu@xxx.xx, DUNNO [0.0136s]
2017-02-27 20:22:16 INFO Starting iRedAPD (version: 2.0, backend: mysql), listening on 127.0.0.1:7777.
2017-02-27 20:22:16 INFO Log rotate type: time, interval: W6, backup copies: 12.
2017-02-27 20:22:16 INFO Loading plugin (priority: 100): reject_null_sender
2017-02-27 20:22:16 INFO Loading plugin (priority: 90): reject_sender_login_mismatch
2017-02-27 20:22:16 INFO Loading plugin (priority: 80): greylisting
2017-02-27 20:22:16 INFO Loading plugin (priority: 60): throttle
2017-02-27 20:22:16 INFO Loading plugin (priority: 50): sql_alias_access_policy
2017-02-27 20:22:16 INFO Loading plugin (priority: 40): amavisd_wblist


2017-02-27 20:23:13 DEBUG Connect from 127.0.0.1, port 54456.
2017-02-27 20:23:13 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:13 DEBUG smtp session: protocol_state=RCPT
2017-02-27 20:23:13 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:13 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:13 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:13 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: recipient=dinhdu@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: recipient_count=0
2017-02-27 20:23:13 DEBUG smtp session: queue_id=
2017-02-27 20:23:13 DEBUG smtp session: instance=909.58b42841.1811.0
2017-02-27 20:23:13 DEBUG smtp session: size=0
2017-02-27 20:23:13 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:13 DEBUG smtp session: stress=
2017-02-27 20:23:13 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:13 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:13 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:13 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:13 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:13 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:13 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:13 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:13 DEBUG --> Apply plugin: reject_null_sender
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: reject_sender_login_mismatch
2017-02-27 20:23:13 DEBUG Sender: admin@xxx.xx, SASL username: admin@xxx.xx
2017-02-27 20:23:13 DEBUG SKIP: sender == sasl username.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: greylisting
2017-02-27 20:23:13 DEBUG Found SASL username, bypass greylisting for outbound email.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:13 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: sql_alias_access_policy
2017-02-27 20:23:13 DEBUG [SQL] query access policy:
SELECT accesspolicy, goto, moderators
               FROM alias
              WHERE address='dinhdu@xxx.xx'
                    AND islist=1
                    AND active=1
              LIMIT 1

2017-02-27 20:23:13 DEBUG SQL query result: None
2017-02-27 20:23:13 DEBUG [SQL] Check whether recipient domain is an alias domain:
SELECT target_domain
                   FROM alias_domain
                  WHERE alias_domain = 'xxx.xx'
                  LIMIT 1

2017-02-27 20:23:13 DEBUG [SQL] query result: None
2017-02-27 20:23:13 DEBUG Recipient domain is not an alias domain.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO Recipient is not a mail alias account or no access policy
2017-02-27 20:23:13 DEBUG --> Apply plugin: amavisd_wblist
2017-02-27 20:23:13 DEBUG Possible policy senders: ['@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.1', '127.0.0.*', '127.0.*.1']
2017-02-27 20:23:13 DEBUG Possible policy recipients: ['@.', 'dinhdu@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx']
2017-02-27 20:23:13 DEBUG Apply wblist for outbound message.
2017-02-27 20:23:13 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.1', '127.0.0.*', '127.0.*.1')
           ORDER BY priority DESC
2017-02-27 20:23:13 DEBUG No record found in SQL database.
2017-02-27 20:23:13 DEBUG No valid sender id or recipient id.
2017-02-27 20:23:13 DEBUG Apply wblist for inbound message.
2017-02-27 20:23:13 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'dinhdu@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx')
           ORDER BY priority DESC
2017-02-27 20:23:13 DEBUG No record found in SQL database.
2017-02-27 20:23:13 DEBUG No valid sender id or recipient id.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG Session ended.
2017-02-27 20:23:13 INFO 127.0.0.1 RCPT, admin@xxx.xx => dinhdu@xxx.xx, DUNNO [0.0224s]
2017-02-27 20:23:13 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:13 DEBUG smtp session: protocol_state=RCPT
2017-02-27 20:23:13 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:13 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:13 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:13 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: recipient=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: recipient_count=0
2017-02-27 20:23:13 DEBUG smtp session: queue_id=070BD44C8B
2017-02-27 20:23:13 DEBUG smtp session: instance=909.58b42841.1811.0
2017-02-27 20:23:13 DEBUG smtp session: size=0
2017-02-27 20:23:13 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:13 DEBUG smtp session: stress=
2017-02-27 20:23:13 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:13 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:13 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:13 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:13 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:13 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:13 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:13 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:13 DEBUG --> Apply plugin: reject_null_sender
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: reject_sender_login_mismatch
2017-02-27 20:23:13 DEBUG Sender: admin@xxx.xx, SASL username: admin@xxx.xx
2017-02-27 20:23:13 DEBUG SKIP: sender == sasl username.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: greylisting
2017-02-27 20:23:13 DEBUG Found SASL username, bypass greylisting for outbound email.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:13 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG --> Apply plugin: sql_alias_access_policy
2017-02-27 20:23:13 DEBUG [SQL] query access policy:
SELECT accesspolicy, goto, moderators
               FROM alias
              WHERE address='admin@xxx.xx'
                    AND islist=1
                    AND active=1
              LIMIT 1

2017-02-27 20:23:13 DEBUG SQL query result: None
2017-02-27 20:23:13 DEBUG [SQL] Check whether recipient domain is an alias domain:
SELECT target_domain
                   FROM alias_domain
                  WHERE alias_domain = 'xxx.xx'
                  LIMIT 1

2017-02-27 20:23:13 DEBUG [SQL] query result: None
2017-02-27 20:23:13 DEBUG Recipient domain is not an alias domain.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO Recipient is not a mail alias account or no access policy
2017-02-27 20:23:13 DEBUG --> Apply plugin: amavisd_wblist
2017-02-27 20:23:13 DEBUG SKIP: Sender is same as recipient.
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG Session ended.
2017-02-27 20:23:13 INFO 127.0.0.1 RCPT, admin@xxx.xx => admin@xxx.xx, DUNNO [0.0121s]
2017-02-27 20:23:13 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:13 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2017-02-27 20:23:13 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:13 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:13 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:13 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:13 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: recipient=
2017-02-27 20:23:13 DEBUG smtp session: recipient_count=2
2017-02-27 20:23:13 DEBUG smtp session: queue_id=070BD44C8B
2017-02-27 20:23:13 DEBUG smtp session: instance=909.58b42841.1811.0
2017-02-27 20:23:13 DEBUG smtp session: size=372
2017-02-27 20:23:13 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:13 DEBUG smtp session: stress=
2017-02-27 20:23:13 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:13 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:13 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:13 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:13 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:13 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:13 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:13 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:13 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:13 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:13 DEBUG Skip plugin: reject_sender_login_mismatch (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:13 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:13 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:13 DEBUG Check sender throttling.
2017-02-27 20:23:13 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='outbound' AND account IN ('127.0.0.1', '@ip', '@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.*', '127.0.*.1')
         ORDER BY priority DESC

2017-02-27 20:23:13 DEBUG [SQL] Query result:
[(1L, '@.', 0, 3600L, 1L, 0L, 0L)]
2017-02-27 20:23:13 DEBUG sender throttle setting: max_msgs=1/id=1/account=@.;
2017-02-27 20:23:13 DEBUG [SQL] Query throttle tracking data:
SELECT id, tid, account, cur_msgs, cur_quota, init_time, last_time
               FROM throttle_tracking
              WHERE (tid=1 AND account='admin@xxx.xx')

2017-02-27 20:23:13 DEBUG [SQL] Query result:
[(1L, 1L, 'admin@xxx.xx', 12, 777L, 1488201602L, 1488201602L)]
2017-02-27 20:23:13 DEBUG Tracking IDs: {(1L, 'admin@xxx.xx'): 1L}
2017-02-27 20:23:13 DEBUG [SQL] Update tracking record(s):

                    UPDATE throttle_tracking
                       SET period = 3600,last_time = 1488201793,init_time = 1488201602,cur_msgs = cur_msgs + 2,cur_quota = cur_quota + 372
                     WHERE id=1;

2017-02-27 20:23:13 DEBUG [OK] Passed all sender throttle settings.
2017-02-27 20:23:13 DEBUG Bypass recipient throttling (found sasl_username).
2017-02-27 20:23:13 DEBUG <-- Result: DUNNO
2017-02-27 20:23:13 DEBUG Skip plugin: sql_alias_access_policy (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:13 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:13 DEBUG Session ended.
2017-02-27 20:23:13 INFO 127.0.0.1 END-OF-MESSAGE, admin@xxx.xx => , DUNNO [0.0107s]
2017-02-27 20:23:47 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:47 DEBUG smtp session: protocol_state=RCPT
2017-02-27 20:23:47 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:47 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:47 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:47 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: recipient=dinhdu@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: recipient_count=0
2017-02-27 20:23:47 DEBUG smtp session: queue_id=
2017-02-27 20:23:47 DEBUG smtp session: instance=909.58b42863.7eb68.0
2017-02-27 20:23:47 DEBUG smtp session: size=0
2017-02-27 20:23:47 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:47 DEBUG smtp session: stress=
2017-02-27 20:23:47 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:47 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:47 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:47 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:47 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:47 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:47 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:47 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:47 DEBUG --> Apply plugin: reject_null_sender
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: reject_sender_login_mismatch
2017-02-27 20:23:47 DEBUG Sender: admin@xxx.xx, SASL username: admin@xxx.xx
2017-02-27 20:23:47 DEBUG SKIP: sender == sasl username.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: greylisting
2017-02-27 20:23:47 DEBUG Found SASL username, bypass greylisting for outbound email.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:47 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: sql_alias_access_policy
2017-02-27 20:23:47 DEBUG [SQL] query access policy:
SELECT accesspolicy, goto, moderators
               FROM alias
              WHERE address='dinhdu@xxx.xx'
                    AND islist=1
                    AND active=1
              LIMIT 1

2017-02-27 20:23:47 DEBUG SQL query result: None
2017-02-27 20:23:47 DEBUG [SQL] Check whether recipient domain is an alias domain:
SELECT target_domain
                   FROM alias_domain
                  WHERE alias_domain = 'xxx.xx'
                  LIMIT 1

2017-02-27 20:23:47 DEBUG [SQL] query result: None
2017-02-27 20:23:47 DEBUG Recipient domain is not an alias domain.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO Recipient is not a mail alias account or no access policy
2017-02-27 20:23:47 DEBUG --> Apply plugin: amavisd_wblist
2017-02-27 20:23:47 DEBUG Possible policy senders: ['@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.1', '127.0.0.*', '127.0.*.1']
2017-02-27 20:23:47 DEBUG Possible policy recipients: ['@.', 'dinhdu@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx']
2017-02-27 20:23:47 DEBUG Apply wblist for outbound message.
2017-02-27 20:23:47 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.1', '127.0.0.*', '127.0.*.1')
           ORDER BY priority DESC
2017-02-27 20:23:47 DEBUG No record found in SQL database.
2017-02-27 20:23:47 DEBUG No valid sender id or recipient id.
2017-02-27 20:23:47 DEBUG Apply wblist for inbound message.
2017-02-27 20:23:47 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'dinhdu@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx')
           ORDER BY priority DESC
2017-02-27 20:23:47 DEBUG No record found in SQL database.
2017-02-27 20:23:47 DEBUG No valid sender id or recipient id.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG Session ended.
2017-02-27 20:23:47 INFO 127.0.0.1 RCPT, admin@xxx.xx => dinhdu@xxx.xx, DUNNO [0.0199s]
2017-02-27 20:23:47 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:47 DEBUG smtp session: protocol_state=RCPT
2017-02-27 20:23:47 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:47 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:47 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:47 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: recipient=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: recipient_count=0
2017-02-27 20:23:47 DEBUG smtp session: queue_id=815A844C8B
2017-02-27 20:23:47 DEBUG smtp session: instance=909.58b42863.7eb68.0
2017-02-27 20:23:47 DEBUG smtp session: size=0
2017-02-27 20:23:47 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:47 DEBUG smtp session: stress=
2017-02-27 20:23:47 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:47 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:47 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:47 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:47 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:47 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:47 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:47 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:47 DEBUG --> Apply plugin: reject_null_sender
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: reject_sender_login_mismatch
2017-02-27 20:23:47 DEBUG Sender: admin@xxx.xx, SASL username: admin@xxx.xx
2017-02-27 20:23:47 DEBUG SKIP: sender == sasl username.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: greylisting
2017-02-27 20:23:47 DEBUG Found SASL username, bypass greylisting for outbound email.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:47 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG --> Apply plugin: sql_alias_access_policy
2017-02-27 20:23:47 DEBUG [SQL] query access policy:
SELECT accesspolicy, goto, moderators
               FROM alias
              WHERE address='admin@xxx.xx'
                    AND islist=1
                    AND active=1
              LIMIT 1

2017-02-27 20:23:47 DEBUG SQL query result: None
2017-02-27 20:23:47 DEBUG [SQL] Check whether recipient domain is an alias domain:
SELECT target_domain
                   FROM alias_domain
                  WHERE alias_domain = 'xxx.xx'
                  LIMIT 1

2017-02-27 20:23:47 DEBUG [SQL] query result: None
2017-02-27 20:23:47 DEBUG Recipient domain is not an alias domain.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO Recipient is not a mail alias account or no access policy
2017-02-27 20:23:47 DEBUG --> Apply plugin: amavisd_wblist
2017-02-27 20:23:47 DEBUG SKIP: Sender is same as recipient.
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG Session ended.
2017-02-27 20:23:47 INFO 127.0.0.1 RCPT, admin@xxx.xx => admin@xxx.xx, DUNNO [0.0073s]
2017-02-27 20:23:47 DEBUG smtp session: request=smtpd_access_policy
2017-02-27 20:23:47 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2017-02-27 20:23:47 DEBUG smtp session: protocol_name=ESMTP
2017-02-27 20:23:47 DEBUG smtp session: client_address=127.0.0.1
2017-02-27 20:23:47 DEBUG smtp session: client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: reverse_client_name=localhost
2017-02-27 20:23:47 DEBUG smtp session: helo_name=xxx.168.30.190
2017-02-27 20:23:47 DEBUG smtp session: sender=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: recipient=
2017-02-27 20:23:47 DEBUG smtp session: recipient_count=2
2017-02-27 20:23:47 DEBUG smtp session: queue_id=815A844C8B
2017-02-27 20:23:47 DEBUG smtp session: instance=909.58b42863.7eb68.0
2017-02-27 20:23:47 DEBUG smtp session: size=372
2017-02-27 20:23:47 DEBUG smtp session: etrn_domain=
2017-02-27 20:23:47 DEBUG smtp session: stress=
2017-02-27 20:23:47 DEBUG smtp session: sasl_method=LOGIN
2017-02-27 20:23:47 DEBUG smtp session: sasl_username=admin@xxx.xx
2017-02-27 20:23:47 DEBUG smtp session: sasl_sender=
2017-02-27 20:23:47 DEBUG smtp session: ccert_subject=
2017-02-27 20:23:47 DEBUG smtp session: ccert_issuer=
2017-02-27 20:23:47 DEBUG smtp session: ccert_fingerprint=
2017-02-27 20:23:47 DEBUG smtp session: encryption_protocol=TLSv1
2017-02-27 20:23:47 DEBUG smtp session: encryption_cipher=DHE-RSA-AES256-SHA
2017-02-27 20:23:47 DEBUG smtp session: encryption_keysize=256
2017-02-27 20:23:47 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:47 DEBUG Skip plugin: reject_sender_login_mismatch (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:47 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:47 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:47 DEBUG Check sender throttling.
2017-02-27 20:23:47 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='outbound' AND account IN ('127.0.0.1', '@ip', '@.', 'admin@xxx.xx', '@xxx.xx', '@.xxx.xx', '@xx', '@.xx', '127.0.0.*', '127.0.*.1')
         ORDER BY priority DESC

2017-02-27 20:23:47 DEBUG [SQL] Query result:
[(1L, '@.', 0, 3600L, 1L, 0L, 0L)]
2017-02-27 20:23:47 DEBUG sender throttle setting: max_msgs=1/id=1/account=@.;
2017-02-27 20:23:47 DEBUG [SQL] Query throttle tracking data:
SELECT id, tid, account, cur_msgs, cur_quota, init_time, last_time
               FROM throttle_tracking
              WHERE (tid=1 AND account='admin@xxx.xx')

2017-02-27 20:23:47 DEBUG [SQL] Query result:
[(1L, 1L, 'admin@xxx.xx', 14, 1149L, 1488201602L, 1488201793L)]
2017-02-27 20:23:47 DEBUG Tracking IDs: {(1L, 'admin@xxx.xx'): 1L}
2017-02-27 20:23:47 DEBUG [SQL] Update tracking record(s):

                    UPDATE throttle_tracking
                       SET period = 3600,last_time = 1488201827,init_time = 1488201602,cur_msgs = cur_msgs + 2,cur_quota = cur_quota + 372
                     WHERE id=1;

2017-02-27 20:23:47 DEBUG [OK] Passed all sender throttle settings.
2017-02-27 20:23:47 DEBUG Bypass recipient throttling (found sasl_username).
2017-02-27 20:23:47 DEBUG <-- Result: DUNNO
2017-02-27 20:23:47 DEBUG Skip plugin: sql_alias_access_policy (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:47 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2017-02-27 20:23:47 DEBUG Session ended.
2017-02-27 20:23:47 INFO 127.0.0.1 END-OF-MESSAGE, admin@xxx.xx => , DUNNO [0.0147s]


Thanks.

8

Re: iRedAdmin throttle now work!

As you can see:

2017-02-27 20:23:13 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:13 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.

How about test with different sender + recipient domains?

9

Re: iRedAdmin throttle now work!

ZhangHuangbin wrote:

As you can see:

2017-02-27 20:23:13 DEBUG --> Apply plugin: throttle
2017-02-27 20:23:13 DEBUG SKIP: Sender domain (@xxx.xx) is same as recipient domain.

How about test with different sender + recipient domains?

I tested send from a domain to another domain and I got it.

Thanks a lot.