On 6/26/2017 1:39 PM, Daniel Miller wrote: > > On 2017-06-23 17:11, wie...@porcupine.org wrote: >> Daniel Miller: >>> I had a couple of accounts with too simple passwords hacked. And >>> obviously >>> my mail server is entirely too efficient - I think about 50k >>> spams got >>> blasted out before I caught it (because we got in the DNSBL's). >>> >>> Separate from improving the password security - what can I do to >>> limit the >>> damage a compromised account can cause? Without receiving user >>> complaints >>> about not being able to send the latest cute kitty pictures to >>> their whole >>> addressbook? >>> >>> Are there per-sender limits that can/should be applied? And is >>> there a way >>> I can be notified of a suspicious condition - without manually >>> monitoring >>> the queue? >> >> Search for "postfix policy rate limit" >> >> Wietse > > The bulk of the results I receive from that refer to external policy > daemons.
Yes, that's the place to look. I recommend postfwd, but many of the policy services can do the job nicely. http://postfwd.org/ Some other policy services: http://www.postfix.org/addon.html#policy You can set the policy service to either reject/defer/hold messages over some limit rate, and also notify you when that happens. Postfwd (and probably some of the others) can trigger an external script to do stuff such as temporarily disable a user account. > ASSP can probably handle that (I'm looking) but I was > hoping for something more Postfix-specific. ASSP is a proxy, not a policy service. I don't care for anything installed as a proxy in front of postfix. I strongly prefer for postfix to do the dirty work of talking to the public internet. > I did come across > references to some parameters I haven't used before - including > > smtpd_client_connection_count_limit > smtpd_client_connection_rate_limit > > which I have presently set to 5 - haven't done any testing to see if > that will have any impact. > > If there's another reference I should consult please tell me. The smtpd_client_**_limit parameters are intended for preventing denial of service from a broken client rather than spam or hacked account mitigation. In particular, these parameters must be set high enough that legit mail never triggers the protection, as that will cause unpredictable and possibly large delays in delivery, including the possibility that some mail never gets delivered. Use with caution. -- Noel Jones --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus