Rate-limiting relays

Questions and answers about how to do stuff
Post Reply
1an3
Posts: 40
Joined: 07 May 2021 13:05

Rate-limiting relays

Post by 1an3 »

Hi

Have searched forum, apologies if I've missed this...

We have a bit of an issue where our SU is contacting >7k recipients here using an external company who send via sendgrid (urgh).
They dump >7k messages in the inbound milter queue in a short space of time, leading to delays for other mail.

I've identified that the messages all come from two sendrid relays, so is there a simple way that I can rate-limit using postfix? and the mail can sit on with sendgrid until I accept it at a more acceptable rate?

Thanks
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Rate-limiting relays

Post by shawniverson »

Yes, you can rate-limit using postfix.

http://www.postfix.org/TUNING_README.html#conn_limit

You'll notice, however that the ratelimiting is global, using an exceptions list. What you want, however, is probably the opposite.

To do that, you may want to take a look at https://postfwd.org/ instead.
1an3
Posts: 40
Joined: 07 May 2021 13:05

Re: Rate-limiting relays

Post by 1an3 »

Thanks for the reply Shawn

I'm not mad keen on putting another level of software on my box as a complication.

I'm tempted to play with the post-fix rate-limiting settings, I dont think there are many well-behaved senders who would be pissed off.

Will have a dig, though. Thanks :-)
Post Reply