0

I am using policyd-rate-limit and it works only for global sending outgoing mails like that:

limits:
   - [30, 600]

Limit to 30 mails yb 10 minutes. And when I try to set limit for each user like that:

limits_by_id:
    test@domain.loc: [1, 600]

then no result :( Unfortunatelly doc for policyd-rate-limit is very poor :(

Macsurf
  • 41
  • 5
  • If you enable `limit_by_sasl` and disable `limit_by_sender` no matching is done if no SASL username is supplied. Are your users all authorizing as their sender address? If not, you might want to limit by sender as well or instead! – anx May 19 '21 at 17:29
  • I have done this before and no result. Only when I have global limit example [5, 60] and limits_by_id: sender@domain.com [1,60] and disable limit by sasl then limits_by_id is unlimited heh – Macsurf May 19 '21 at 17:43

1 Answers1

2

OK I have solved this problem.

Correct configuration is to pass a list of limits for each id:

limits:
   - [30, 600]
limits_by_id:
   sender1@domain.com:
      - [5, 600]
   sender2@domain.com:
      - [10, 600]
anx
  • 8,963
  • 5
  • 24
  • 48
Macsurf
  • 41
  • 5