1

Topic: Activating per user throttling

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.3
- Linux/BSD distribution name and version: CentOS Linux release 7.2.1511 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Hi,

I just installed and configured new server with latest iredmail release (I had to import my existing LDIF of user accounts on new server) and after installing iredmail I upgraded to newer iRedAdmin-Pro interface by using which I would like to achieve per user and per domain throttling.

By using Admin-Pro panel settings are not getting applied on domain level or per user level. I would like to restrict users not to send out going emails more than 1 mb size.

Can you guide further if I am missing anything?

----

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

2

Re: Activating per user throttling

Do you have plugin 'throttle' enabled in iRedAPD config file /opt/iredapd/settings.py? Show us output of below command:

grep 'plugins' /opt/iredapd/settings.py

3

Re: Activating per user throttling

Yes Zhang,

Plugin is enabled.

Here is the output:

[root@mail ~]# grep 'plugins' /opt/iredapd/settings.py
# Enabled plugins.
plugins = ["reject_null_sender", "greylisting", "throttle", "amavisd_wblist", "ldap_maillist_access_policy"]

I checked in main.cf also in various sections where iredapd is enabled and effective as by default installation does in configuration. such as below:

# Recipient restrictions
smtpd_recipient_restrictions =
    reject_unknown_recipient_domain
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    check_policy_service inet:127.0.0.1:7777
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination


# END-OF-MESSAGE restrictions
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777

Still cannot figure out what is the issue.

4

Re: Activating per user throttling

Please try this:

*) Show us output of SQL commands below:

sql> USE iredapd;
sql> SELECT * FROM throttle;

*) Turn on debug mode in iRedAPD, restart iredapd service, reproduce this issue, extract FULL log related to this issue from iRedAPD log file, and paste here.

Reference:
http://www.iredmail.org/docs/debug.iredapd.html

5 (edited by ketan.aagja 2016-01-07 00:05:20)

Re: Activating per user throttling

Hi Zhang,

Here is output:

MariaDB [(none)]>  USE iredapd;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [iredapd]>  SELECT * FROM throttle;
Empty set (0.00 sec)

Turned on debug mode from settings.py file, restarted iredapd service, tried setting up throttling per domain and per user settings but nothing is setting up (showing) in iRedAdmin panel. All settings are getting wiped out give same default interface.

Iredapd logs:

2016-01-05 17:48:19 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-05 17:48:19 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-05 17:48:19 INFO Loading plugin: reject_null_sender
2016-01-05 17:48:19 INFO Loading plugin: greylisting
2016-01-05 17:48:19 INFO Loading plugin: amavisd_wblist
2016-01-05 17:48:19 INFO Loading plugin: throttle
2016-01-05 17:48:19 INFO Loading plugin: ldap_maillist_access_policy
2016-01-05 18:30:03 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-05 18:30:03 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-05 18:30:03 INFO Loading plugin: reject_null_sender
2016-01-05 18:30:03 INFO Loading plugin: greylisting
2016-01-05 18:30:03 INFO Loading plugin: amavisd_wblist
2016-01-05 18:30:03 INFO Loading plugin: throttle
2016-01-05 18:30:03 INFO Loading plugin: ldap_maillist_access_policy
2016-01-05 19:07:26 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-05 19:07:26 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-05 19:07:26 INFO Loading plugin: reject_null_sender
2016-01-05 19:07:26 INFO Loading plugin: greylisting
2016-01-05 19:07:26 INFO Loading plugin: amavisd_wblist
2016-01-05 19:07:26 INFO Loading plugin: throttle
2016-01-05 19:07:26 INFO Loading plugin: ldap_maillist_access_policy
2016-01-05 19:30:49 DEBUG Connect from 127.0.0.1, port 59272.
2016-01-05 19:30:49 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 19:30:49 DEBUG smtp session: protocol_state=RCPT
2016-01-05 19:30:49 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 19:30:49 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 19:30:49 DEBUG smtp session: client_name=localhost
2016-01-05 19:30:49 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 19:30:49 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 19:30:49 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 19:30:49 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 19:30:49 DEBUG smtp session: recipient_count=0
2016-01-05 19:30:49 DEBUG smtp session: queue_id=
2016-01-05 19:30:49 DEBUG smtp session: instance=1003.568c19e9.810f8.0
2016-01-05 19:30:49 DEBUG smtp session: size=0
2016-01-05 19:30:49 DEBUG smtp session: etrn_domain=
2016-01-05 19:30:49 DEBUG smtp session: stress=
2016-01-05 19:30:49 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 19:30:49 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 19:30:49 DEBUG smtp session: sasl_sender=
2016-01-05 19:30:49 DEBUG smtp session: ccert_subject=
2016-01-05 19:30:49 DEBUG smtp session: ccert_issuer=
2016-01-05 19:30:49 DEBUG smtp session: ccert_fingerprint=
2016-01-05 19:30:49 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 19:30:49 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 19:30:49 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 19:30:49 DEBUG smtp session: encryption_keysize=256
2016-01-05 19:30:49 DEBUG LDAP connection initialied success.
2016-01-05 19:30:49 DEBUG LDAP bind success.
2016-01-05 19:30:49 DEBUG --> Apply plugin: reject_null_sender
2016-01-05 19:30:49 DEBUG Local sender.
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO
2016-01-05 19:30:49 DEBUG --> Apply plugin: greylisting
2016-01-05 19:30:49 DEBUG Found SASL username, bypass greylisting for outbound email.
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO
2016-01-05 19:30:49 DEBUG --> Apply plugin: amavisd_wblist
2016-01-05 19:30:49 DEBUG Possible policy senders: ['@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk']
2016-01-05 19:30:49 DEBUG Possible policy recipients: ['@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com']
2016-01-05 19:30:49 DEBUG Apply wblist for outbound message.
2016-01-05 19:30:49 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk')
           ORDER BY priority DESC
2016-01-05 19:30:49 DEBUG No record found in SQL database.
2016-01-05 19:30:49 DEBUG No valid sender id or recipient id.
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO
2016-01-05 19:30:49 DEBUG --> Apply plugin: throttle
2016-01-05 19:30:49 DEBUG Check sender throttling.
2016-01-05 19:30:49 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 19:30:49 DEBUG [SQL] Query result:
[]
2016-01-05 19:30:49 DEBUG No sender throttle setting.
2016-01-05 19:30:49 DEBUG Check recipient throttling.
2016-01-05 19:30:49 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 19:30:49 DEBUG [SQL] Query result:
[]
2016-01-05 19:30:49 DEBUG No recipient throttle setting.
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO
2016-01-05 19:30:49 DEBUG [+] Getting LDIF data of account: ExternalUser@externaldomain.com
2016-01-05 19:30:49 DEBUG search base dn: o=domains,dc=mydomain,dc=co,dc=uk
2016-01-05 19:30:49 DEBUG search scope: SUBTREE
2016-01-05 19:30:49 DEBUG search filter: (&(|(mail=ExternalUser@externaldomain.com)(shadowAddress=ExternalUser@externaldomain.com))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-05 19:30:49 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-05 19:30:49 DEBUG No such account.
2016-01-05 19:30:49 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO (No recipient LDIF data)
2016-01-05 19:30:49 INFO [127.0.0.1] RCPT, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 19:30:49 DEBUG Session ended
2016-01-05 19:30:49 DEBUG Close LDAP connection.
2016-01-05 19:30:49 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 19:30:49 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-05 19:30:49 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 19:30:49 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 19:30:49 DEBUG smtp session: client_name=localhost
2016-01-05 19:30:49 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 19:30:49 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 19:30:49 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 19:30:49 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 19:30:49 DEBUG smtp session: recipient_count=1
2016-01-05 19:30:49 DEBUG smtp session: queue_id=9E5EC1081E1DC
2016-01-05 19:30:49 DEBUG smtp session: instance=1003.568c19e9.810f8.0
2016-01-05 19:30:49 DEBUG smtp session: size=2708807
2016-01-05 19:30:49 DEBUG smtp session: etrn_domain=
2016-01-05 19:30:49 DEBUG smtp session: stress=
2016-01-05 19:30:49 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 19:30:49 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 19:30:49 DEBUG smtp session: sasl_sender=
2016-01-05 19:30:49 DEBUG smtp session: ccert_subject=
2016-01-05 19:30:49 DEBUG smtp session: ccert_issuer=
2016-01-05 19:30:49 DEBUG smtp session: ccert_fingerprint=
2016-01-05 19:30:49 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 19:30:49 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 19:30:49 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 19:30:49 DEBUG smtp session: encryption_keysize=256
2016-01-05 19:30:49 DEBUG LDAP connection initialied success.
2016-01-05 19:30:49 DEBUG LDAP bind success.
2016-01-05 19:30:49 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-05 19:30:49 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-05 19:30:49 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-05 19:30:49 DEBUG --> Apply plugin: throttle
2016-01-05 19:30:49 DEBUG Check sender throttling.
2016-01-05 19:30:49 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 19:30:49 DEBUG [SQL] Query result:
[]
2016-01-05 19:30:49 DEBUG No sender throttle setting.
2016-01-05 19:30:49 DEBUG Check recipient throttling.
2016-01-05 19:30:49 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 19:30:49 DEBUG [SQL] Query result:
[]
2016-01-05 19:30:49 DEBUG No recipient throttle setting.
2016-01-05 19:30:49 DEBUG <-- Result: DUNNO
2016-01-05 19:30:49 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-05 19:30:49 INFO [127.0.0.1] END-OF-MESSAGE, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 19:30:49 DEBUG Session ended
2016-01-05 19:30:49 DEBUG Close LDAP connection.
2016-01-05 20:27:58 DEBUG Connect from 127.0.0.1, port 59700.
2016-01-05 20:27:58 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:27:58 DEBUG smtp session: protocol_state=RCPT
2016-01-05 20:27:58 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:27:58 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:27:58 DEBUG smtp session: client_name=localhost
2016-01-05 20:27:58 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:27:58 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 20:27:58 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:27:58 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 20:27:58 DEBUG smtp session: recipient_count=0
2016-01-05 20:27:58 DEBUG smtp session: queue_id=
2016-01-05 20:27:58 DEBUG smtp session: instance=131c.568c274e.bc21f.0
2016-01-05 20:27:58 DEBUG smtp session: size=0
2016-01-05 20:27:58 DEBUG smtp session: etrn_domain=
2016-01-05 20:27:58 DEBUG smtp session: stress=
2016-01-05 20:27:58 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 20:27:58 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 20:27:58 DEBUG smtp session: sasl_sender=
2016-01-05 20:27:58 DEBUG smtp session: ccert_subject=
2016-01-05 20:27:58 DEBUG smtp session: ccert_issuer=
2016-01-05 20:27:58 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:27:58 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:27:58 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 20:27:58 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 20:27:58 DEBUG smtp session: encryption_keysize=256
2016-01-05 20:27:58 DEBUG LDAP connection initialied success.
2016-01-05 20:27:58 DEBUG LDAP bind success.
2016-01-05 20:27:58 DEBUG --> Apply plugin: reject_null_sender
2016-01-05 20:27:58 DEBUG Local sender.
2016-01-05 20:27:58 DEBUG <-- Result: DUNNO
2016-01-05 20:27:58 DEBUG --> Apply plugin: greylisting
2016-01-05 20:27:58 DEBUG Found SASL username, bypass greylisting for outbound email.
2016-01-05 20:27:58 DEBUG <-- Result: DUNNO
2016-01-05 20:27:58 DEBUG --> Apply plugin: amavisd_wblist
2016-01-05 20:27:58 DEBUG Possible policy senders: ['@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk']
2016-01-05 20:27:58 DEBUG Possible policy recipients: ['@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com']
2016-01-05 20:27:58 DEBUG Apply wblist for outbound message.
2016-01-05 20:27:58 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk')
           ORDER BY priority DESC
2016-01-05 20:27:58 DEBUG Local addresses (in `users`): [(1L, 'testuser@mydomain.co.uk')]
2016-01-05 20:27:58 DEBUG [SQL] Query external addresses:
SELECT id, email
               FROM mailaddr
              WHERE email IN ('@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com')
           ORDER BY priority DESC
2016-01-05 20:27:58 DEBUG No record found in SQL database.
2016-01-05 20:27:58 DEBUG No valid sender id or recipient id.
2016-01-05 20:27:58 DEBUG <-- Result: DUNNO
2016-01-05 20:27:58 DEBUG --> Apply plugin: throttle
2016-01-05 20:27:58 DEBUG Check sender throttling.
2016-01-05 20:27:58 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:27:58 DEBUG [SQL] Query result:
[]
2016-01-05 20:27:58 DEBUG No sender throttle setting.
2016-01-05 20:27:58 DEBUG Check recipient throttling.
2016-01-05 20:27:58 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:27:58 DEBUG [SQL] Query result:
[]
2016-01-05 20:27:58 DEBUG No recipient throttle setting.
2016-01-05 20:27:58 DEBUG <-- Result: DUNNO
2016-01-05 20:27:58 DEBUG [+] Getting LDIF data of account: ExternalUser@externaldomain.com
2016-01-05 20:27:58 DEBUG search base dn: o=domains,dc=mydomain,dc=co,dc=uk
2016-01-05 20:27:58 DEBUG search scope: SUBTREE
2016-01-05 20:27:58 DEBUG search filter: (&(|(mail=ExternalUser@externaldomain.com)(shadowAddress=ExternalUser@externaldomain.com))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-05 20:27:58 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-05 20:27:58 DEBUG No such account.
2016-01-05 20:27:58 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-05 20:27:58 DEBUG <-- Result: DUNNO (No recipient LDIF data)
2016-01-05 20:27:58 INFO [127.0.0.1] RCPT, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 20:27:58 DEBUG Session ended
2016-01-05 20:27:58 DEBUG Close LDAP connection.
2016-01-05 20:27:59 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:27:59 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-05 20:27:59 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:27:59 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:27:59 DEBUG smtp session: client_name=localhost
2016-01-05 20:27:59 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:27:59 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 20:27:59 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:27:59 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 20:27:59 DEBUG smtp session: recipient_count=1
2016-01-05 20:27:59 DEBUG smtp session: queue_id=C632910862B4F
2016-01-05 20:27:59 DEBUG smtp session: instance=131c.568c274e.bc21f.0
2016-01-05 20:27:59 DEBUG smtp session: size=2709099
2016-01-05 20:27:59 DEBUG smtp session: etrn_domain=
2016-01-05 20:27:59 DEBUG smtp session: stress=
2016-01-05 20:27:59 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 20:27:59 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 20:27:59 DEBUG smtp session: sasl_sender=
2016-01-05 20:27:59 DEBUG smtp session: ccert_subject=
2016-01-05 20:27:59 DEBUG smtp session: ccert_issuer=
2016-01-05 20:27:59 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:27:59 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:27:59 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 20:27:59 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 20:27:59 DEBUG smtp session: encryption_keysize=256
2016-01-05 20:27:59 DEBUG LDAP connection initialied success.
2016-01-05 20:27:59 DEBUG LDAP bind success.
2016-01-05 20:27:59 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-05 20:27:59 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-05 20:27:59 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-05 20:27:59 DEBUG --> Apply plugin: throttle
2016-01-05 20:27:59 DEBUG Check sender throttling.
2016-01-05 20:27:59 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:27:59 DEBUG [SQL] Query result:
[]
2016-01-05 20:27:59 DEBUG No sender throttle setting.
2016-01-05 20:27:59 DEBUG Check recipient throttling.
2016-01-05 20:27:59 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:27:59 DEBUG [SQL] Query result:
[]
2016-01-05 20:27:59 DEBUG No recipient throttle setting.
2016-01-05 20:27:59 DEBUG <-- Result: DUNNO
2016-01-05 20:27:59 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-05 20:27:59 INFO [127.0.0.1] END-OF-MESSAGE, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 20:27:59 DEBUG Session ended
2016-01-05 20:27:59 DEBUG Close LDAP connection.
2016-01-05 20:30:36 DEBUG Connect from 127.0.0.1, port 59774.
2016-01-05 20:30:36 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:30:36 DEBUG smtp session: protocol_state=RCPT
2016-01-05 20:30:36 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:30:36 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:30:36 DEBUG smtp session: client_name=localhost
2016-01-05 20:30:36 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:30:36 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 20:30:36 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:30:36 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 20:30:36 DEBUG smtp session: recipient_count=0
2016-01-05 20:30:36 DEBUG smtp session: queue_id=
2016-01-05 20:30:36 DEBUG smtp session: instance=136f.568c27ec.c72dd.0
2016-01-05 20:30:36 DEBUG smtp session: size=0
2016-01-05 20:30:36 DEBUG smtp session: etrn_domain=
2016-01-05 20:30:36 DEBUG smtp session: stress=
2016-01-05 20:30:36 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 20:30:36 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 20:30:36 DEBUG smtp session: sasl_sender=
2016-01-05 20:30:36 DEBUG smtp session: ccert_subject=
2016-01-05 20:30:36 DEBUG smtp session: ccert_issuer=
2016-01-05 20:30:36 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:30:36 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:30:36 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 20:30:36 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 20:30:36 DEBUG smtp session: encryption_keysize=256
2016-01-05 20:30:36 DEBUG LDAP connection initialied success.
2016-01-05 20:30:36 DEBUG LDAP bind success.
2016-01-05 20:30:36 DEBUG --> Apply plugin: reject_null_sender
2016-01-05 20:30:36 DEBUG Local sender.
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO
2016-01-05 20:30:36 DEBUG --> Apply plugin: greylisting
2016-01-05 20:30:36 DEBUG Found SASL username, bypass greylisting for outbound email.
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO
2016-01-05 20:30:36 DEBUG --> Apply plugin: amavisd_wblist
2016-01-05 20:30:36 DEBUG Possible policy senders: ['@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk']
2016-01-05 20:30:36 DEBUG Possible policy recipients: ['@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com']
2016-01-05 20:30:36 DEBUG Apply wblist for outbound message.
2016-01-05 20:30:36 DEBUG [SQL] Query local addresses:
SELECT id, email
               FROM users
              WHERE email IN ('@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk')
           ORDER BY priority DESC
2016-01-05 20:30:36 DEBUG Local addresses (in `users`): [(1L, 'testuser@mydomain.co.uk')]
2016-01-05 20:30:36 DEBUG [SQL] Query external addresses:
SELECT id, email
               FROM mailaddr
              WHERE email IN ('@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com')
           ORDER BY priority DESC
2016-01-05 20:30:36 DEBUG No record found in SQL database.
2016-01-05 20:30:36 DEBUG No valid sender id or recipient id.
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO
2016-01-05 20:30:36 DEBUG --> Apply plugin: throttle
2016-01-05 20:30:36 DEBUG Check sender throttling.
2016-01-05 20:30:36 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:30:36 DEBUG [SQL] Query result:
[]
2016-01-05 20:30:36 DEBUG No sender throttle setting.
2016-01-05 20:30:36 DEBUG Check recipient throttling.
2016-01-05 20:30:36 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:30:36 DEBUG [SQL] Query result:
[]
2016-01-05 20:30:36 DEBUG No recipient throttle setting.
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO
2016-01-05 20:30:36 DEBUG [+] Getting LDIF data of account: ExternalUser@externaldomain.com
2016-01-05 20:30:36 DEBUG search base dn: o=domains,dc=mydomain,dc=co,dc=uk
2016-01-05 20:30:36 DEBUG search scope: SUBTREE
2016-01-05 20:30:36 DEBUG search filter: (&(|(mail=ExternalUser@externaldomain.com)(shadowAddress=ExternalUser@externaldomain.com))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-05 20:30:36 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-05 20:30:36 DEBUG No such account.
2016-01-05 20:30:36 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO (No recipient LDIF data)
2016-01-05 20:30:36 INFO [127.0.0.1] RCPT, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 20:30:36 DEBUG Session ended
2016-01-05 20:30:36 DEBUG Close LDAP connection.
2016-01-05 20:30:36 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:30:36 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-05 20:30:36 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:30:36 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:30:36 DEBUG smtp session: client_name=localhost
2016-01-05 20:30:36 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:30:36 DEBUG smtp session: helo_name=10.0.0.38
2016-01-05 20:30:36 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:30:36 DEBUG smtp session: recipient=ExternalUser@externaldomain.com
2016-01-05 20:30:36 DEBUG smtp session: recipient_count=1
2016-01-05 20:30:36 DEBUG smtp session: queue_id=D199BF5CD373
2016-01-05 20:30:36 DEBUG smtp session: instance=136f.568c27ec.c72dd.0
2016-01-05 20:30:36 DEBUG smtp session: size=388
2016-01-05 20:30:36 DEBUG smtp session: etrn_domain=
2016-01-05 20:30:36 DEBUG smtp session: stress=
2016-01-05 20:30:36 DEBUG smtp session: sasl_method=LOGIN
2016-01-05 20:30:36 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-05 20:30:36 DEBUG smtp session: sasl_sender=
2016-01-05 20:30:36 DEBUG smtp session: ccert_subject=
2016-01-05 20:30:36 DEBUG smtp session: ccert_issuer=
2016-01-05 20:30:36 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:30:36 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:30:36 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-05 20:30:36 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-05 20:30:36 DEBUG smtp session: encryption_keysize=256
2016-01-05 20:30:36 DEBUG LDAP connection initialied success.
2016-01-05 20:30:36 DEBUG LDAP bind success.
2016-01-05 20:30:36 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-05 20:30:36 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-05 20:30:36 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-05 20:30:36 DEBUG --> Apply plugin: throttle
2016-01-05 20:30:36 DEBUG Check sender throttling.
2016-01-05 20:30:36 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:30:36 DEBUG [SQL] Query result:
[]
2016-01-05 20:30:36 DEBUG No sender throttle setting.
2016-01-05 20:30:36 DEBUG Check recipient throttling.
2016-01-05 20:30:36 DEBUG [SQL] Query throttle setting:

        SELECT id, account, priority, period, max_msgs, max_quota, msg_size
          FROM throttle
         WHERE kind='inbound' AND account IN ('127.0.0.1', '@ip', '@.', 'ExternalUser@externaldomain.com', '@externaldomain.com', '@.externaldomain.com', '@com', '@.com', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC
         
2016-01-05 20:30:36 DEBUG [SQL] Query result:
[]
2016-01-05 20:30:36 DEBUG No recipient throttle setting.
2016-01-05 20:30:36 DEBUG <-- Result: DUNNO
2016-01-05 20:30:36 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-05 20:30:36 INFO [127.0.0.1] END-OF-MESSAGE, => testuser@mydomain.co.uk -> ExternalUser@externaldomain.com, DUNNO
2016-01-05 20:30:36 DEBUG Session ended
2016-01-05 20:30:36 DEBUG Close LDAP connection.
2016-01-05 20:36:15 DEBUG Connect from 127.0.0.1, port 59956.
2016-01-05 20:36:15 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:36:15 DEBUG smtp session: protocol_state=RCPT
2016-01-05 20:36:15 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:36:15 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:36:15 DEBUG smtp session: client_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: helo_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:36:15 DEBUG smtp session: recipient=testuser@mydomain.co.uk
2016-01-05 20:36:15 DEBUG smtp session: recipient_count=0
2016-01-05 20:36:15 DEBUG smtp session: queue_id=
2016-01-05 20:36:15 DEBUG smtp session: instance=1423.568c293f.c7ca2.0
2016-01-05 20:36:15 DEBUG smtp session: size=0
2016-01-05 20:36:15 DEBUG smtp session: etrn_domain=
2016-01-05 20:36:15 DEBUG smtp session: stress=
2016-01-05 20:36:15 DEBUG smtp session: sasl_method=
2016-01-05 20:36:15 DEBUG smtp session: sasl_username=
2016-01-05 20:36:15 DEBUG smtp session: sasl_sender=
2016-01-05 20:36:15 DEBUG smtp session: ccert_subject=
2016-01-05 20:36:15 DEBUG smtp session: ccert_issuer=
2016-01-05 20:36:15 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:36:15 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:36:15 DEBUG smtp session: encryption_protocol=
2016-01-05 20:36:15 DEBUG smtp session: encryption_cipher=
2016-01-05 20:36:15 DEBUG smtp session: encryption_keysize=0
2016-01-05 20:36:15 DEBUG LDAP connection initialied success.
2016-01-05 20:36:15 DEBUG LDAP bind success.
2016-01-05 20:36:15 DEBUG --> Apply plugin: reject_null_sender
2016-01-05 20:36:15 DEBUG Local sender.
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO
2016-01-05 20:36:15 DEBUG --> Apply plugin: greylisting
2016-01-05 20:36:15 DEBUG Local sender.
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO
2016-01-05 20:36:15 DEBUG --> Apply plugin: amavisd_wblist
2016-01-05 20:36:15 DEBUG Sender is same as recipient, bypassed.
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO
2016-01-05 20:36:15 DEBUG --> Apply plugin: throttle
2016-01-05 20:36:15 DEBUG Sender domain (@mydomain.co.uk) is same as recipient domain, skip throttling.
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO
2016-01-05 20:36:15 DEBUG [+] Getting LDIF data of account: testuser@mydomain.co.uk
2016-01-05 20:36:15 DEBUG search base dn: o=domains,dc=mydomain,dc=co,dc=uk
2016-01-05 20:36:15 DEBUG search scope: SUBTREE
2016-01-05 20:36:15 DEBUG search filter: (&(|(mail=testuser@mydomain.co.uk)(shadowAddress=testuser@mydomain.co.uk))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-05 20:36:15 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-05 20:36:15 DEBUG result: [('mail=testuser@mydomain.co.uk,ou=Users,domainName=mydomain.co.uk,o=domains,dc=mydomain,dc=co,dc=uk', {'objectClass': ['inetOrgPerson', 'mailUser', 'shadowAccount', 'amavisAccount']})]
2016-01-05 20:36:15 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO (Not a mail list account)
2016-01-05 20:36:15 INFO [127.0.0.1] RCPT, testuser@mydomain.co.uk -> testuser@mydomain.co.uk, DUNNO
2016-01-05 20:36:15 DEBUG Session ended
2016-01-05 20:36:15 DEBUG Close LDAP connection.
2016-01-05 20:36:15 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:36:15 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-05 20:36:15 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:36:15 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:36:15 DEBUG smtp session: client_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: helo_name=localhost
2016-01-05 20:36:15 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:36:15 DEBUG smtp session: recipient=testuser@mydomain.co.uk
2016-01-05 20:36:15 DEBUG smtp session: recipient_count=1
2016-01-05 20:36:15 DEBUG smtp session: queue_id=D62BDF5CD374
2016-01-05 20:36:15 DEBUG smtp session: instance=1423.568c293f.c7ca2.0
2016-01-05 20:36:15 DEBUG smtp session: size=788
2016-01-05 20:36:15 DEBUG smtp session: etrn_domain=
2016-01-05 20:36:15 DEBUG smtp session: stress=
2016-01-05 20:36:15 DEBUG smtp session: sasl_method=
2016-01-05 20:36:15 DEBUG smtp session: sasl_username=
2016-01-05 20:36:15 DEBUG smtp session: sasl_sender=
2016-01-05 20:36:15 DEBUG smtp session: ccert_subject=
2016-01-05 20:36:15 DEBUG smtp session: ccert_issuer=
2016-01-05 20:36:15 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:36:15 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:36:15 DEBUG smtp session: encryption_protocol=
2016-01-05 20:36:15 DEBUG smtp session: encryption_cipher=
2016-01-05 20:36:15 DEBUG smtp session: encryption_keysize=0
2016-01-05 20:36:15 DEBUG LDAP connection initialied success.
2016-01-05 20:36:15 DEBUG LDAP bind success.
2016-01-05 20:36:15 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-05 20:36:15 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-05 20:36:15 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-05 20:36:15 DEBUG --> Apply plugin: throttle
2016-01-05 20:36:15 DEBUG Sender domain (@mydomain.co.uk) is same as recipient domain, skip throttling.
2016-01-05 20:36:15 DEBUG <-- Result: DUNNO
2016-01-05 20:36:15 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-05 20:36:15 INFO [127.0.0.1] END-OF-MESSAGE, testuser@mydomain.co.uk -> testuser@mydomain.co.uk, DUNNO
2016-01-05 20:36:15 DEBUG Session ended
2016-01-05 20:36:15 DEBUG Close LDAP connection.
2016-01-05 20:37:07 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:37:07 DEBUG smtp session: protocol_state=RCPT
2016-01-05 20:37:07 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:37:07 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:37:07 DEBUG smtp session: client_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: helo_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:37:07 DEBUG smtp session: recipient=testuser@mydomain.co.uk
2016-01-05 20:37:07 DEBUG smtp session: recipient_count=0
2016-01-05 20:37:07 DEBUG smtp session: queue_id=
2016-01-05 20:37:07 DEBUG smtp session: instance=1423.568c2973.59850.0
2016-01-05 20:37:07 DEBUG smtp session: size=0
2016-01-05 20:37:07 DEBUG smtp session: etrn_domain=
2016-01-05 20:37:07 DEBUG smtp session: stress=
2016-01-05 20:37:07 DEBUG smtp session: sasl_method=
2016-01-05 20:37:07 DEBUG smtp session: sasl_username=
2016-01-05 20:37:07 DEBUG smtp session: sasl_sender=
2016-01-05 20:37:07 DEBUG smtp session: ccert_subject=
2016-01-05 20:37:07 DEBUG smtp session: ccert_issuer=
2016-01-05 20:37:07 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:37:07 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:37:07 DEBUG smtp session: encryption_protocol=
2016-01-05 20:37:07 DEBUG smtp session: encryption_cipher=
2016-01-05 20:37:07 DEBUG smtp session: encryption_keysize=0
2016-01-05 20:37:07 DEBUG LDAP connection initialied success.
2016-01-05 20:37:07 DEBUG LDAP bind success.
2016-01-05 20:37:07 DEBUG --> Apply plugin: reject_null_sender
2016-01-05 20:37:07 DEBUG Local sender.
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO
2016-01-05 20:37:07 DEBUG --> Apply plugin: greylisting
2016-01-05 20:37:07 DEBUG Local sender.
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO
2016-01-05 20:37:07 DEBUG --> Apply plugin: amavisd_wblist
2016-01-05 20:37:07 DEBUG Sender is same as recipient, bypassed.
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO
2016-01-05 20:37:07 DEBUG --> Apply plugin: throttle
2016-01-05 20:37:07 DEBUG Sender domain (@mydomain.co.uk) is same as recipient domain, skip throttling.
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO
2016-01-05 20:37:07 DEBUG [+] Getting LDIF data of account: testuser@mydomain.co.uk
2016-01-05 20:37:07 DEBUG search base dn: o=domains,dc=mydomain,dc=co,dc=uk
2016-01-05 20:37:07 DEBUG search scope: SUBTREE
2016-01-05 20:37:07 DEBUG search filter: (&(|(mail=testuser@mydomain.co.uk)(shadowAddress=testuser@mydomain.co.uk))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2016-01-05 20:37:07 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2016-01-05 20:37:07 DEBUG result: [('mail=testuser@mydomain.co.uk,ou=Users,domainName=mydomain.co.uk,o=domains,dc=mydomai,dc=co,dc=uk', {'objectClass': ['inetOrgPerson', 'mailUser', 'shadowAccount', 'amavisAccount']})]
2016-01-05 20:37:07 DEBUG --> Apply plugin: ldap_maillist_access_policy
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO (Not a mail list account)
2016-01-05 20:37:07 INFO [127.0.0.1] RCPT, testuser@mydomain.co.uk -> testuser@mydomain.co.uk, DUNNO
2016-01-05 20:37:07 DEBUG Session ended
2016-01-05 20:37:07 DEBUG Close LDAP connection.
2016-01-05 20:37:07 DEBUG smtp session: request=smtpd_access_policy
2016-01-05 20:37:07 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-05 20:37:07 DEBUG smtp session: protocol_name=ESMTP
2016-01-05 20:37:07 DEBUG smtp session: client_address=127.0.0.1
2016-01-05 20:37:07 DEBUG smtp session: client_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: reverse_client_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: helo_name=localhost
2016-01-05 20:37:07 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-05 20:37:07 DEBUG smtp session: recipient=testuser@mydomain.co.uk
2016-01-05 20:37:07 DEBUG smtp session: recipient_count=1
2016-01-05 20:37:07 DEBUG smtp session: queue_id=661464D8D87C
2016-01-05 20:37:07 DEBUG smtp session: instance=1423.568c2973.59850.0
2016-01-05 20:37:07 DEBUG smtp session: size=792
2016-01-05 20:37:07 DEBUG smtp session: etrn_domain=
2016-01-05 20:37:07 DEBUG smtp session: stress=
2016-01-05 20:37:07 DEBUG smtp session: sasl_method=
2016-01-05 20:37:07 DEBUG smtp session: sasl_username=
2016-01-05 20:37:07 DEBUG smtp session: sasl_sender=
2016-01-05 20:37:07 DEBUG smtp session: ccert_subject=
2016-01-05 20:37:07 DEBUG smtp session: ccert_issuer=
2016-01-05 20:37:07 DEBUG smtp session: ccert_fingerprint=
2016-01-05 20:37:07 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-05 20:37:07 DEBUG smtp session: encryption_protocol=
2016-01-05 20:37:07 DEBUG smtp session: encryption_cipher=
2016-01-05 20:37:07 DEBUG smtp session: encryption_keysize=0
2016-01-05 20:37:07 DEBUG LDAP connection initialied success.
2016-01-05 20:37:07 DEBUG LDAP bind success.
2016-01-05 20:37:07 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-05 20:37:07 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-05 20:37:07 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-05 20:37:07 DEBUG --> Apply plugin: throttle
2016-01-05 20:37:07 DEBUG Sender domain (@mydomain.co.uk) is same as recipient domain, skip throttling.
2016-01-05 20:37:07 DEBUG <-- Result: DUNNO
2016-01-05 20:37:07 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-05 20:37:07 INFO [127.0.0.1] END-OF-MESSAGE, testuser@mydomain.co.uk -> testuser@mydomain.co.uk, DUNNO
2016-01-05 20:37:07 DEBUG Session ended
2016-01-05 20:37:07 DEBUG Close LDAP connection.
2016-01-05 20:50:08 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-05 20:50:08 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-05 20:50:08 INFO Loading plugin: reject_null_sender
2016-01-05 20:50:08 INFO Loading plugin: greylisting
2016-01-05 20:50:08 INFO Loading plugin: amavisd_wblist
2016-01-05 20:50:08 INFO Loading plugin: throttle
2016-01-05 20:50:08 INFO Loading plugin: ldap_maillist_access_policy
2016-01-05 20:53:36 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-05 20:53:36 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-05 20:53:36 INFO Loading plugin: reject_null_sender
2016-01-05 20:53:36 INFO Loading plugin: greylisting
2016-01-05 20:53:36 INFO Loading plugin: amavisd_wblist
2016-01-05 20:53:36 INFO Loading plugin: throttle
2016-01-05 20:53:36 INFO Loading plugin: ldap_maillist_access_policy
2016-01-06 15:47:26 INFO Starting iRedAPD (version: 1.7.0, backend: ldap), listening on 127.0.0.1:7777.
2016-01-06 15:47:26 INFO Log rotate type: time, interval: W6, backup copies: 12.
2016-01-06 15:47:26 INFO Loading plugin: reject_null_sender
2016-01-06 15:47:26 INFO Loading plugin: greylisting
2016-01-06 15:47:26 INFO Loading plugin: amavisd_wblist
2016-01-06 15:47:26 INFO Loading plugin: throttle
2016-01-06 15:47:26 INFO Loading plugin: ldap_maillist_access_policy

Still SQL query response is same:
MariaDB [iredapd]>  SELECT * FROM throttle;
Empty set (0.00 sec)

And upon modifying nothing is generated in logs.

6

Re: Activating per user throttling

ketan.aagja wrote:

MariaDB [iredapd]>  SELECT * FROM throttle;
Empty set (0.00 sec)

There's no throttle settings at all.

Please define some throttle settings first with iRedAdmin-Pro:

*) For server-wide throttle setting, please go to "System -> Anti Spam -> Throttle"
*) For per-domain or per-user throttle setting, please go to account domain profile page, under tab "Throttle".

7 (edited by ketan.aagja 2016-01-07 01:43:06)

Re: Activating per user throttling

Hi Zhang,

I am doing the same as I want to assign only per user throttling. So in my testuser@mydomain.co.uk throttle setting I am applying, somehow I think I was only selecting Cumulative size of all outbound emails field assigning 1000000 bytes which was not saving and showing settings on admin panel.

Check screenshot :
https://nimbus.everhelper.me/client/not … x3CaFnqPTg

After selecting and changing all throttle options it saved and shown everything on admin panel and started working as well.

But when I am changing all settings back to its default values admin panel throws "internal server error" message on screen and admin panel goes off. Upon pressing refresh or back button admin panel comes back to old settings.

When throttle settings are saved iredapd logs are showing blocking fine.

2016-01-06 17:28:48 DEBUG smtp session: request=smtpd_access_policy
2016-01-06 17:28:48 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-06 17:28:48 DEBUG smtp session: protocol_name=ESMTP
2016-01-06 17:28:48 DEBUG smtp session: client_address=127.0.0.1
2016-01-06 17:28:48 DEBUG smtp session: client_name=localhost
2016-01-06 17:28:48 DEBUG smtp session: reverse_client_name=localhost
2016-01-06 17:28:48 DEBUG smtp session: helo_name=10.0.0.38
2016-01-06 17:28:48 DEBUG smtp session: sender=testuser@mydomain.co.uk
2016-01-06 17:28:48 DEBUG smtp session: recipient=ExternalUser@domain.com
2016-01-06 17:28:48 DEBUG smtp session: recipient_count=1
2016-01-06 17:28:48 DEBUG smtp session: queue_id=2442510862B54
2016-01-06 17:28:48 DEBUG smtp session: instance=575d.568d4ed0.1bebe.0
2016-01-06 17:28:48 DEBUG smtp session: size=2709087
2016-01-06 17:28:48 DEBUG smtp session: etrn_domain=
2016-01-06 17:28:48 DEBUG smtp session: stress=
2016-01-06 17:28:48 DEBUG smtp session: sasl_method=LOGIN
2016-01-06 17:28:48 DEBUG smtp session: sasl_username=testuser@mydomain.co.uk
2016-01-06 17:28:48 DEBUG smtp session: sasl_sender=
2016-01-06 17:28:48 DEBUG smtp session: ccert_subject=
2016-01-06 17:28:48 DEBUG smtp session: ccert_issuer=
2016-01-06 17:28:48 DEBUG smtp session: ccert_fingerprint=
2016-01-06 17:28:48 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-06 17:28:48 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-06 17:28:48 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-06 17:28:48 DEBUG smtp session: encryption_keysize=256
2016-01-06 17:28:48 DEBUG LDAP connection initialied success.
2016-01-06 17:28:48 DEBUG LDAP bind success.
2016-01-06 17:28:48 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-06 17:28:48 DEBUG Skip plugin: greylisting (protocol_state != END-OF-MESSAGE)
2016-01-06 17:28:48 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-06 17:28:48 DEBUG --> Apply plugin: throttle
2016-01-06 17:28:48 DEBUG Check sender throttling.
2016-01-06 17:28:48 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', '@.', 'testuser@mydomain.co.uk', '@mydomain.co.uk', '@.mydomain.co.uk', '@co.uk', '@.co.uk', '@uk', '@.uk', '127.*.0.1', '127.*.*.*', '*.*.*.1', '127.0.0.*', '*.*.0.1', '*.0.0.1', '127.0.*.1', '*.*.*.*', '127.*.*.1', '127.0.*.*')
         ORDER BY priority DESC

2016-01-06 17:28:48 DEBUG [SQL] Query result:
[(1L, 'testuser@mydomain.co.uk', 8, 60L, 0, 1000000, 0L)]
2016-01-06 17:28:48 DEBUG sender throttle setting: msg_size=0 (bytes)/id=1/account=testuser@mydomain.co.uk; max_msgs=0/id=1/account=testuser@mydomain.co.uk; max_quota=1000000 (bytes)/id=1/account=testuser@mydomain.co.uk;
2016-01-06 17:28:48 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='testuser@mydomain.co.uk')

2016-01-06 17:28:48 DEBUG [SQL] Query result:
[(1L, 1L, 'testuser@mydomain.co.uk', 1, 2708802L, 1452101290L, 1452101290L)]
2016-01-06 17:28:48 DEBUG Tracking IDs: {(1L, 'testuser@mydomain.co.uk'): 1L}
2016-01-06 17:28:48 DEBUG Period of max_msgs expired, reset.
2016-01-06 17:28:48 INFO [127.0.0.1] [testuser@mydomain.co.uk] sender throttle for msg_size (2709087/0)
2016-01-06 17:28:48 INFO [127.0.0.1] [testuser@mydomain.co.uk] Exceeds sender throttle for max_quota, current: 2708802. (msg_size=0 (bytes)/id=1/account=testuser@mydomain.co.uk; max_msgs=0/id=1/account=testuser@mydomain.co.uk; max_quota=1000000 (bytes)/id=1/account=testuser@mydomain.co.uk; )
2016-01-06 17:28:48 DEBUG <-- Result: REJECT Quota exceeded (accumulated message size)
2016-01-06 17:28:48 DEBUG INSERT INTO log (admin, ip, msg, timestamp, event)
                          VALUES ('iredapd', '127.0.0.1', 'REJECT Quota exceeded (accumulated message size) (testuser@mydomain.co.uk -> ExternalUser@domain.com, throttle)', NOW(), 'iredapd')

2016-01-06 17:28:48 INFO [127.0.0.1] END-OF-MESSAGE, => testuser@mydomain.co.uk -> ExternalUser@domain.com, REJECT Quota exceeded (accumulated message size)
2016-01-06 17:28:48 DEBUG Session ended
2016-01-06 17:28:48 DEBUG Close LDAP connection.


But now I am not able to set default settings on throttle page on admin panel, new issue.

8

Re: Activating per user throttling

Sorry about this trouble. Is there any related error in Apache error log file?

9

Re: Activating per user throttling

Here is a log for apache:

Jan  6 17:28:15 mail postfix/smtpd[22389]: connect from localhost[127.0.0.1]
Jan  6 17:28:15 mail postfix/smtpd[22389]: DD7F910862B67: client=localhost[127.0.0.1]
Jan  6 17:28:15 mail postfix/cleanup[22368]: DD7F910862B67: message-id=<ab9585345f5a6433cdd550eca06c12f5@mydomain.co.uk>
Jan  6 17:28:15 mail postfix/smtpd[22389]: disconnect from localhost[127.0.0.1]
Jan  6 17:28:15 mail postfix/qmgr[2674]: DD7F910862B67: from=<testuser@mydomain.co.uk>, size=2710118, nrcpt=1 (queue active)
Jan  6 17:28:15 mail amavis[14188]: (14188-04) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:39391 <testuser@mydomain.co.uk> -> <sending@mydomain.co.uk>, Queue-ID: F41FF10862B54, Message-ID: <ab9585345f5a6433cdd550eca06c12f5@mydomain.co.uk>, mail_id: l9C6Cm4JsI6F, Hits: -0.998, size: 2708989, queued_as: DD7F910862B67, dkim_new=dkim:mydomain.co.uk, 5671 ms
Jan  6 17:28:15 mail postfix/smtp[22371]: F41FF10862B54: to=<sending@mydomain.co.uk>, relay=127.0.0.1[127.0.0.1]:10026, delay=6, delays=0.31/0.01/0/5.7, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as DD7F910862B67)
Jan  6 17:28:15 mail postfix/qmgr[2674]: F41FF10862B54: removed
Jan  6 17:28:15 mail postfix/pipe[22397]: DD7F910862B67: to=<sending@mydomain.co.uk>, relay=dovecot, delay=0.08, delays=0.03/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)
Jan  6 17:28:15 mail postfix/qmgr[2674]: DD7F910862B67: removed
Jan  6 17:28:26 mail roundcube: <543mm2s9> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.co.uk,o=domains,dc=bnscolorama,dc=co,dc=uk. Bad search filter (POST /mail/?_task=mail&_action=autocomplete?_task=&_action=)
Jan  6 17:28:28 mail postfix/submission/smtpd[22365]: connect from localhost[127.0.0.1]
Jan  6 17:28:28 mail postfix/submission/smtpd[22365]: E763D10862B54: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=testuser@mydomain.co.uk
Jan  6 17:28:28 mail postfix/cleanup[22368]: E763D10862B54: message-id=<a2a6fd2c1206d118e87714b14372927b@mydomain.co.uk>
Jan  6 17:28:29 mail postfix/submission/smtpd[22365]: E763D10862B54: reject: END-OF-MESSAGE from localhost[127.0.0.1]: 554 5.7.1 <END-OF-MESSAGE>: End-of-data rejected: Quota exceeded (accumulated message size); from=<testuser@mydomain.co.uk> to=<externaluser@gmail.com> proto=ESMTP helo=<10.0.0.38>
Jan  6 17:28:29 mail roundcube: <543mm2s9> SMTP Error: Failed to send data. [554] 5.7.1 <END-OF-MESSAGE>: End-of-data rejected: Quota exceeded (accumulated message size) in /var/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1452101283061&_lang=en_US&_framed=1?_task=mail&_action=send)
Jan  6 17:28:29 mail postfix/submission/smtpd[22365]: disconnect from localhost[127.0.0.1]
Jan  6 17:28:48 mail postfix/submission/smtpd[22365]: connect from localhost[127.0.0.1]
Jan  6 17:28:48 mail postfix/submission/smtpd[22365]: 2442510862B54: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=testuser@mydomain.co.uk
Jan  6 17:28:48 mail postfix/cleanup[22368]: 2442510862B54: message-id=<a2a6fd2c1206d118e87714b14372927b@mydomain.co.uk>
Jan  6 17:28:48 mail postfix/submission/smtpd[22365]: 2442510862B54: reject: END-OF-MESSAGE from localhost[127.0.0.1]: 554 5.7.1 <END-OF-MESSAGE>: End-of-data rejected: Quota exceeded (accumulated message size); from=<testuser@mydomain.co.uk> to=<externaluser@gmail.com> proto=ESMTP helo=<10.0.0.38>
Jan  6 17:28:48 mail roundcube: <543mm2s9> SMTP Error: Failed to send data. [554] 5.7.1 <END-OF-MESSAGE>: End-of-data rejected: Quota exceeded (accumulated message size) in /var/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1452101301737&_lang=en_US&_framed=1?_task=mail&_action=send)
Jan  6 17:28:48 mail postfix/submission/smtpd[22365]: disconnect from localhost[127.0.0.1]

10

Re: Activating per user throttling

Another single error I found is as stated below:

Jan  6 17:02:00 mail roundcube: <543mm2s9> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.co.uk,o=domains,dc=mydomain,dc=co,dc=uk. Bad search filter (POST /mail/?_task=mail&_action=autocomplete?_task=&_action=)

11

Re: Activating per user throttling

Excuse me, Is there any related error in Apache error log file?

12

Re: Activating per user throttling

ZhangHuangbin wrote:

Excuse me, Is there any related error in Apache error log file?

Sorry zhang, I directed maillogs.

Attached are respective logs that you require.

I think ssl_error logs shows something useful.

Post's attachments

Logs.zip 7.09 kb, 3 downloads since 2016-01-07 

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

13

Re: Activating per user throttling

[Wed Jan 06 17:02:50.439037 2016] [:error] [pid 3216] [remote 172.16.1.20:196] IntegrityError: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`iredapd`.`throttle_tracking`, CONSTRAINT `throttle_tracking_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `throttle` (`id`))')

This is the error log.

Looks like some data were changed in `iredapd.throttle` table, but `iredapd.throttle_tracking` still uses old data. I will try to reproduce this issue and fix it.

14

Re: Activating per user throttling

Thanks Zhang... for your kind support.

15

Re: Activating per user throttling

Confirmed, it's a bug in the latest iRedAdmin-Pro release. Here's patch to fix it:

diff -r 1a25659e05f5 libs/iredapd/throttle.py
--- a/libs/iredapd/throttle.py    Thu Jan 07 02:01:59 2016 +0800
+++ b/libs/iredapd/throttle.py    Thu Jan 07 22:23:11 2016 +0800
@@ -51,10 +51,14 @@
                      account,
                      setting,
                      inout_type='inbound'):
-        # Delete existing throttle setting first.
-        self.db.delete('throttle',
-                       vars={'account': account, 'inout_type': inout_type},
-                       where='kind=$inout_type AND account=$account')
+        # Try to get exist setting.
+        update_existing_setting = False
+
+        qr = self.get_throttle_setting(account=account, inout_type=inout_type)
+        if qr:
+            # Update existing throttle setting
+            update_existing_setting = True
+            t_id = qr['id']
 
         delete_tracking = False
         if setting:
@@ -68,9 +72,16 @@
                 return (False, 'INVALID_ACCOUNT')
 
             # Add new throttle setting.
-            self.db.insert('throttle', **setting)
-        else:
-            delete_tracking = True
+            try:
+                if update_existing_setting:
+                    self.db.update('throttle',
+                                   vars={'tid': t_id},
+                                   where='id=$tid',
+                                   **setting)
+                else:
+                    self.db.insert('throttle', **setting)
+            except Exception, e:
+                return (False, str(e))
 
         if delete_tracking:
             self.delete_throttle_tracking(account=account, inout_type=inout_type)

If you're not familiar with patch, i can mail you a patched version of iRedAdmin-Pro.

16

Re: Activating per user throttling

Yes Zhang, I do not have any clue how to apply this. It would be great if you can provide patched version. I think then I will only have to issue upgrade command.

17

Re: Activating per user throttling

Excuse me, could you please mail me (support _at_ iredmail.org) the email address you used to buy iRedAdmin-Pro license? i cannot find your email address (used to register this forum) in our license database.

18

Re: Activating per user throttling

Hi Zhang,

I have just sent one Test email from my email address which is associated with my iRedAdmin-Pro license.

19

Re: Activating per user throttling

ketan.aagja wrote:

I think then I will only have to issue upgrade command.

Just follow our tutorial to upgrade to the patched version, as usual:
http://www.iredmail.org/docs/migrate.or … admin.html