Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to implement per-user rate and size limits (i.e. certain maximum number of mails/volume per hour) for all outgoing mail. So far I've implemented that via postfwd policy daemon for sasl-authenticated users. However, some users also have accounts on the box making it possible for them to send mails from their web apps using the /usr/sbin/sendmail command.

Is there any way to implement per-user rate-limiting for that case as well or is my only option to forbid submitting mails this way through authorized_submit_users and require submission via sasl-authenticated SMTP?

share|improve this question
up vote 0 down vote accepted

You can use a sendmail milter for non-smtp traffic using the non_smtpd_milters parameter.

If that doesn't solve it for you, the safest way is to prohibit local sendmail(1) submission and force SMTP submission.

share|improve this answer
Too bad there are no restrictions that allow the use of a policy daemon since I don't want to set up a separate milter in addition to postfwd. So I guess I can only try to disallow regular users sendmail submission and see if I get complaints... – jond Jan 16 '13 at 11:43
check_policy_service is a restriction; restrictions are applied in the SMTP context. – adaptr Jan 16 '13 at 14:29

Your Answer


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.