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?


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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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