OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Outflow limiting
From: Ronald F. Guilmette (rfgmonkeys.com)
Date: Thu Aug 03 2000 - 17:06:14 CDT


Assume that one has Postfix installed and running with the AUTH (RFC 2554)
support included.

Now assume that one starts giving out mail accounts to people who one may
or may not not trust completely (i.e. one or more of them may decide to
become spammers at some point).

Given this scenario, it's quite obvious that it would be nice to be able
to limit the number of messages that can be sent by any given user on any
given day to some fixed maximum number, for example, 200.

What would be the Best Way to implement this in Postfix?

Has anybody here already done it?

------------
Footnote: Obviously, to make this work, you must keep a list of the time-
stamps of sent messages for each user, and then retire those from the list
for that user as they age past 24 hours. Doing this all in main memory
seems entirely resonable to me (even if not to other people) because I
anticipate the machine and mail server in question to crash only quite
infrequently, and even when they do, the only down-side is that the
message accounting starts over fresh from the instant that the thing is
brought back up... and that doesn't present any major problem. (Somebody
might be able to get 400 message out that day, rather than just 200, but
that's still not a very large number.)