This _might_ bit a tad off topic since it involves maildrop but this really
SHOULD work. I want quotas to work on a per user and per domain basis. 

I am trying this on Maildir mailboxes within a vpopmail 4.9.2 + qmail 1.0.3
system. It's a pretty generic vpopmail installation, all users within a
~vpopmail/domain hierarchy. Everything works just great, I can point a web
browser at sqwebmail via https and check mail, courier IMAP, courier IMAP +
SSL, qpop3d, smtp, and qmail-send are all functioning as I expect. Slick!
So, I'm testing to find out if quotas work and it appears not. :-(  Here's
what I've done:

I've grabbed the latest version of maildrop and installed it as follows:

  # cd /usr/local/src
  # lynx http://www.flounder.net/~mrsam/maildrop/
  # tar zxvf maildrop-1.1.20000805.tar.gz; cd maildrop-1.1.20000805
  # ./configure --prefix=/usr/local --exec-prefix=/usr/local
     --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw
     --enable-maildirquota
  # make install-strip
  # make install-man
  
I've got qmail installed in /var/qmail like everything expects. So, I change
the /var/qmail/rc to use maildrop for local deliveries:

   #!/bin/sh

   # Using splogger to send the log through syslog.
   # Using qmail-local to deliver messages to Maildir format by default
   exec env - PATH="/var/qmail/bin:$PATH" qmail-start '|
/usr/local/bin/maildrop' 

As you can see I've tried a couple iterations of this. Mail all gets
delivered by maildrop as I would have expected. A users's Mailbox looks like
this:

  serv1# ll matt/Maildir/*
  -rw-r--r--  1 vpopmail  vchkpw    14 Sep 22 12:49
matt/Maildir/courierimapuiddb
  -rw-------  1 vpopmail  vchkpw    31 Sep 21 00:46
matt/Maildir/sqwebmail-config
  -rw-------  1 vpopmail  vchkpw  2048 Sep 21 00:45
matt/Maildir/sqwebmail-curcache.db1
  -rw-------  1 vpopmail  vchkpw     4 Sep 21 00:45
matt/Maildir/sqwebmail-curcnt
  -rw-------  1 vpopmail  vchkpw    15 Sep 21 00:33
matt/Maildir/sqwebmail-pass
  -rw-------  1 vpopmail  vchkpw     0 Sep 21 00:46
matt/Maildir/sqwebmail-sig
  -rw-------  1 vpopmail  vchkpw     1 Sep 21 02:46
matt/Maildir/sqwebmail-timestamp

  matt/Maildir/cur:

  matt/Maildir/new:
  
  -rw-------  1 vpopmail  vchkpw  55064 Sep 22 15:11
969660737.46714.mail4.mailserve.lightrealm.com,S=55064

  matt/Maildir/tmp:


You can see that maildrop is the local delivery agent as it's putting the
message size checksums at the end of the filename (cool idea). It's
delivering to the proper mailbox and, in general, doing everything I'd have
expected. However, it's not honoring the quota mechanism or I've got it set
up wrong. 

To set up the quota I've tried a couple things. The first is using the
vpopmail command "vsetuserquota" to set it. It makes the change to the users
quota as witnessed by my custom values:

   serv1# cat vpasswd
   matt:fX8ZRwcdjpN2g:1:0:Matt
Simerson:/home/vpopmail/domains/mailserve.com/matt:1k
   me:6tzhYNKooC8yQ:1:0:Test
User:/home/vpopmail/domains/mailserve.com/me:1000
 
postmaster:vtDa1cB7mCB3Q:1:0:Postmaster:/home/vpopmail/domains/mailserve.com
/postmaster:NOQUOTA
  
So, I've set the quota then dump a bunch of mail to it. It quite happily
continues delivering long after the quota is passed. :-(  

I've also tried using deliverquota with a fixed maximum but it doesn't fail
deliveries either. 

Anyone see what I'm missing?

Matt


Doesn't an incoming email go something like this:


  [EMAIL PROTECTED] --> tcpserver --> rblsmtpd --> qmail-smtpd &
rcpthosts --> 

  qmail-send & virtualdomains --> qmaill-spawn & ~qmail/users/cdb --> 

  qmail-local & ~alias/.qmail & ~home/.qmail  -->  ~home/.qmail-default

So, in a standard vpopmail config, the message has traversed throughout all
the config files and finally gets caught by the .qmail-default rule. It
calls vdelivermail which in turn figures out, based upon the contents of the
vpasswd file which mailbox to deliver to.

Since I'm calling maildrop, does it too then go consult the ~qmail/users/cdb
file, and then read the ~home/vpasswd file to find the users home dir? 

As I think about this.... there are other methods of accomplishing my
means... Like using the systems build in password and quota scheme and
assigning every domain to a unique UID. This makes it REALLY easy and
inexpensive (in terms of performance) to implement a domain quota. Any, best
yet, only requires a little bit of code changes to the vadddomain program.
Adding a spiffy little --enable-users-domains or something like that and
have vadddomain support a -u <username> option passed to it.

Matt



Reply via email to