csvalpha / amber-api

https://csvalpha.nl
MIT License
4 stars 4 forks source link

Rate limiting improvmx #375

Open wilco375 opened 1 year ago

wilco375 commented 1 year ago

Currently the rate limiting of SMTP (moderated) mails is set to one per day (https://github.com/csvalpha/amber-api/blob/1c19909194a6d363e6906d6a899d2ba769bd75f0/app/controllers/v1/stored_mails_controller.rb#L26). However, we can send 200 mails per day, so e.g. a moderated mail to 30 people should not block another moderated mail to 120 people. So ideally, the limit is based on how many people have been emailed so far, and to how many the mail being moderated has to be sent.