I've undertaken the task of cleaning up vdelivermail. I think I've fixed some problems where vdelivermail could exit without closing its connection to MySQL. I've also fixed sections that exited with the wrong exit code (causing qmail-local to assume mail was delivered when it wasn't, or vice-versa).
I'm now digging into quotas. Oh, the joy.
I found one immediate problem. vdelivermail was adding an email's size to the maildirsize file before it was successfully delivered. If there was any sort of error, the maildirsize file would end up out of whack.
Additionally, the size of the extra headers (Return-Path and Delivered-To) weren't included in the values written. This causes a problem because POP/IMAP will enter a negative value for the size of the entire message (including those headers). I could be wrong on that -- the POP/IMAP server might use the "S=" part of the filename which was also written incorrectly by the old vdelivermail.
Anyway, I've made some good progress, and now it only updates maildirsize if the message was successfully written. It will update the maildirsize of ANY Maildir that it delivers to, including valiases, the catchall, and save-a-copy on .qmail files that forward to another location.
The only missing piece is actually checking for overquota situations on anything but a standard user without a .qmail file. I also don't handle the situation where the maildirsize file does not exist. Realistically, I can only re-create it for the Maildir that belongs to the current user. Other than reading the maildirsize file, there's no easy way to look up a quota based on a Maildir directory path.
After all of the time I've put into it, there's no way I'm going to touch domain quotas...
If anyone knows of any other vdelivermail oddities that should be fixed, please let me know and I'll try to address them in this upcoming release.
Tom Collins - [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/
- [vchkpw] vdelivermail, user quotas and the maildirsize file Tom Collins
- Re: [vchkpw] vdelivermail, user quotas and the maildir... Dave Goodrich
- RE: [vchkpw] vdelivermail, user quotas and the maildir... shadowplay.net