Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Django installation that is configured to email administrators (five of us) whenever an error occurs. All of the generated emails are directed to postfix and then on to the mail server for distribution. Unfortunately, we encountered an error that looped over the weekend, sending nearly 500,000 emails.

With that being said, I'd like to throttle postfix to send emails at a reduced rate. Obviously, there are other ways to tackle this issue, but I'd like to start with postfix since it feels like the path of least resistance.

My first attempt at meeting this objective was adding these config parameters to postfix/anvil:

smtpd_client_message_rate_limit = 5
anvil_rate_time_limit = 60s

I wrote a simple program to send one email per second, hoping that the params above would send out one email every five seconds. Unfortunately, that didn't work, which brought me here.

Any advice on this matter is greatly appreciated.

share|improve this question
add comment

1 Answer

postfix isn't a good way to deal with this.. Take a look at the following it worked like a champ for me

http://stackoverflow.com/questions/2052284/how-to-throttle-django-error-emails

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.