Mike Cardwell: Checking application/pgp-signature: FAILURE -- Start of PGP signed section. > * on the Fri, Oct 24, 2014 at 03:41:22PM -0400, Wietse Venema wrote: > > >> Is there a way to limit connections from web applications on the same > >> server for postfix? > >> The web application sends messages via smtp on localhost (127.0.0.1:25). > >> > >> Need to limit the maximum 5k messages per hour. Is that possible? > > > > You don't want to do that in Postfix, as it would have > > to reject mail, and rejected mail would not be delivered. > > > > Rate limit the PHP application. > > I did this for a shared hosting system about ten years ago using the > ident functionality in Exim. I installed a local ident daemon and > then configured Exim to talk to it. Once Exim knew the user, it could > apply user-level ratelimiting to both mail submitted via the > executable and that submitted via a TCP socket together.
And how does Exim throttle the client? If it replies with 4xx or 5xx then you are rejecting mail, and rejected mail would not be delivered. Postfix has built-in rate limits but unlike you I am not evangelizing about those for the reasons stated in the previous paragraph. Wietse