1 (edited by fisher006 2017-02-02 18:12:57)

Topic: throttle problem

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

Hi, i have two rules in MySQL

MariaDB [iredapd]> select * from throttle;
+----+----------------+----------+----------+--------+----------+----------+-----------+
| id | account        | kind     | priority | period | msg_size | max_msgs | max_quota |
+----+----------------+----------+----------+--------+----------+----------+-----------+
|  2 | @.subdomain.pl | outbound |        0 |   3600 |        0 |        2 |         0 |
|  3 | @.             | outbound |        0 |  86400 |        0 |     1500 |         0 |
+----+----------------+----------+----------+--------+----------+----------+-----------+
2 rows in set (0.00 sec)



smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:7777,
                               permit_mynetworks,
                               reject_unknown_sender_domain,
                               reject_unknown_recipient_domain,
                               reject_non_fqdn_sender,
                               reject_non_fqdn_recipient,
                               reject_unlisted_recipient,
                               permit_sasl_authenticated,
                               reject_unauth_destination,
                               check_client_access hash:/etc/postfix/rbl_override,
                               reject_rbl_client zen.spamhaus.org,
                               reject_rbl_client bl.spamcop.net,
                               reject_rbl_client cbl.abuseat.org,
                               reject_rbl_client zen.spamhaus.org
smtpd_end_of_data_restrictions =
        check_policy_service inet:127.0.0.1:7777

and when I'm sending from test@test.subdomain.pl


2017-02-02 11:09:54 INFO [185.23.21.92] [test@jakub2.subdomain.pl] Exceeds sender throttle for max_msgs, current: 19. (max_msgs=2/id=2/account=@.subdomain.pl; )
2017-02-02 11:09:54 INFO 185.23.21.92 RCPT, test@jakub2.subdomain.pl => web-qtfjh@mail-tester.com, REJECT Quota exceeded (number of mails in total) [0.0476s]
Feb  2 11:09:51 mail4 postfix/smtpd[8356]: AB48C428C63C: client=ip[185.23.21.92], sasl_method=PLAIN, sasl_username=test@jakub2.subdomain.pl
Feb  2 11:09:54 mail4 postfix/cleanup[7230]: AB48C428C63C: message-id=<c0d6c46539a5d479963210a69dec74b4@jakub2.subdomain.pl>
Feb  2 11:09:55 mail4 postfix/qmgr[644]: AB48C428C63C: from=<test@jakub2.subdomain.pl>, size=656, nrcpt=1 (queue active)
Feb  2 11:09:55 mail4 amavis[8990]: (08990-03-7) Passed CLEAN {RelayedInbound}, [185.23.21.92]:36471 [185.23.21.92] <test@jakub2.subdomain.pl> -> <web-qtfjh@mail-tester.com>, Queue-ID: AB48C428C63C, Message-ID: <c0d6c46539a5d479963210a69dec74b4@jakub2.subdomain.pl>, mail_id: VZbawm5mDe45, Hits: -0.199, size: 622, queued_as: C78E442726FD, 708 ms, Tests: [ALL_TRUSTED=-1,BAYES_50=0.8,TVD_SPACE_RATIO=0.001]
Feb  2 11:09:55 mail4 postfix/smtp[7871]: AB48C428C63C: to=<web-qtfjh@mail-tester.com>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=7, delay=7.3, delays=6.5/0/0/0.71, 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 C78E442726FD)
Feb  2 11:09:55 mail4 postfix/qmgr[644]: AB48C428C63C: removed

----

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

2

Re: throttle problem

and one more question:


it is possible add throttling per account?

I need limit for all accounts in one domain


*@domain.com

3

Re: throttle problem

What's the "problem" in your first post? It's not clear.

fisher006 wrote:

it is possible add throttling per account?

It's mentioned in our tutorial:
http://www.iredmail.org/docs/manage.iredapd.html

4 (edited by fisher006 2017-02-03 16:24:41)

Re: throttle problem

I can't find rules for subdomains i need something to throttle domains with wildcard

name.domain.com
name2.domain.com
name3.domain.com


INSERT INTO throttle (account, kind, priority, period, msg_size, max_msgs, max_quota) VALUES ('@.*.domain.pl', 'outbound', 10, 86400, 0, 5, 0);

this doesn't work

5

Re: throttle problem

For all subdomains, use '@.domain.com'. Not "@.*.domain.com".

6

Re: throttle problem

doesn't work becasue


I have rule

|  4 | @.domain.pl | outbound |       10 |  86400 |        0 |        5 |         0 |

and if I send 5 email from

test@sub1.domain.pl

i can't send from

test@sub2.domain.pl


2017-02-05 11:20:17 INFO 193.187.64.108 RCPT, test@jakub7.domain.pl => mail@jakubmail.domain.pl, REJECT Quota exceeded (number of mails in total) [0.0034s]
2017-02-05 11:20:17 INFO [193.187.65.15] [test@jakub3.domain.pl] Exceeds sender throttle for max_msgs, current: 5. (max_msgs=5/id=4/account=@.domain.pl; )
2017-02-05 11:20:17 INFO 193.187.65.15 RCPT, test@jakub3.domain.pl => mail@jakubmail.domain.pl, REJECT Quota exceeded (number of mails in total) [0.0029s]

7

Re: throttle problem

So with "@.domain.com", you expect  each domain can send X messages, not all sun-domains can send X in total, am I right?

iRedAPD doesn't support this with latest release, I will try to implement it in future release.

8

Re: throttle problem

Yes exacly.
Thanks mate

9

Re: throttle problem

fisher006 wrote:

I have rule

|  4 | @.domain.pl | outbound |       10 |  86400 |        0 |        5 |         0 |

and if I send 5 email from
test@sub1.domain.pl
i can't send from
test@sub2.domain.pl

2017-02-05 11:20:17 INFO 193.187.64.108 RCPT, test@jakub7.domain.pl => mail@jakubmail.domain.pl, REJECT Quota exceeded (number of mails in total) [0.0034s]
2017-02-05 11:20:17 INFO [193.187.65.15] [test@jakub3.domain.pl] Exceeds sender throttle for max_msgs, current: 5. (max_msgs=5/id=4/account=@.domain.pl; )
2017-02-05 11:20:17 INFO 193.187.65.15 RCPT, test@jakub3.domain.pl => mail@jakubmail.domain.pl, REJECT Quota exceeded (number of mails in total) [0.0029s]

Dear @fisher006,

I cannot reproduce this issue with iRedAPD-2.0. Could you please try to reproduce it again?

With '@.domain.pl' as throttle account, iRedAPD always stores sender email address in throttle_tracking sql table, so it won't accumulate the quota (max_msgs in this case).