2

Been learning Postfix and trying to setup my own mail queue server for newsletters (no mailchimp or sendgrid).

I'm stuck on the last thing I wanted to implement, which is delays/queue. I found a tutorial on how to rate limit here : http://steam.io/2013/04/01/postfix-rate-limiting/

However, they rate limit per domain, is it possible to rate limit by MX record ? That way if I try to send to user@gmail.com and user@domainmxatgmail.com it would be rate limited because they use same MX records?

I'm using virtual aliases & mysql. After I figure this out, my next step would be to figure out how to apply the policy to a specific sender from my server (e.g. newsletter@domain.com to be rate limited.)

I have rabbitmq installed on the server as well if that needed to be used, but as I understand, this should be the MTA's job.


Michael here says it can't be done.

Postfix - rate limit outgoing concurrent connections to one machine/ip

Darius
  • 345

1 Answers1

2

You can rate limit by MX by adding smtpd_sender_restrictions = check_recipient_mx_access hash:/etc/postfix/mxtransport to main.cf and then defining a file mxtransport with something like yahoodns.net FILTER smtp-throttle-1s: where yahoodns.net is the domain part of MX record and smtp-throttle-1s is the transport for which you've defined rate limits.

wes
  • 21