Quoting Christian Bauer ([EMAIL PROTECTED]): > Hi there, > > I've got some problems with getting qpopper properly work > with disk quotas. > > I will do the following: > > Softquota of 10MB. > Hardquota of 20MB. ... > or is it a total conceptual misstake how i try to implement the > quotas?
Yeah, it is, in my view. Better is to not use the kernel/FS to maintain quotae, but rather something involved in mail. 1) you want the softquota to be the max they can ever reach (cause it will double on the copy of the mail). 2) if you just run an external program to note usage per user (du?) into, perhaps, a db file (for speed) and then alert based on that, you get what you need. I don't recall the scheme, but Sendmail's imap server would inject messages into the stream on overquota and warnings. Most GUI clients will display errors as a popup window. This may have been IMAP only; I just forget. One technique might be to look at the auth code and, up to once a day, fail the authentication with an error "WARNING: You are at 95% of your quota. delete messages." They can then reauth and you can let it work. Alternatively, use the bulletins routines to inject a message to the user. (you don't want to deliver a warning to the user which ups their quota). Keep in mind, too, that 1) Failures of overquota messages should be temporary failures. Nothing like having a nice denial of service by sending 10 100k messages to a user with a 1MB quota and bouncing their mail for them. 2) let it deliver that last large message. Using the 1MB quota example, if I'm at 600kb and I get a 500kb message, I need to be able to delete that (or know about it). So don't bounce the message because it would put me over quota, bounce ones AFTER I'm over so I can get rid of the big one. The fact that you are dealing with a spool copy makes it harder. The fact that file system quotae are designed and intended and developed for users files (not mail), expose weaknesses in its use for mail.