sendmail hooks for pre-checking of over-quota imap users?

Scott Adkins adkinss at ohio.edu
Fri May 14 11:28:04 EDT 2004


I was curious if anyone has implemented a mechanism in sendmail to determine
if a user is over their Cyrus quota before attempting LMTP delivery of the
message.  If so, how was it impemented?

In our environment, I would have to say that easily, 3/4ths of all our 
e-mail
hitting the LMTP server is over-quota'd e-mail.

What I have done is to create a new hash file called /etc/mail/overquota.db
that gets updated periodically (once an hour or maybe even less) with the
list of users currently over their quota's.  I then modified the sendmail
queuegroup rules to check for the existence of a user in that hash file and
move then to the overquota queue if so.

I find this better than dumping all e-mail destined for local delivery to
the cyrus queue, and then using a queue mover to find all the messages that
had attempted LMTP delivery, but failed with an "Over quota" message.  That
turns out to be very expensive with regards to disk I/O and CPU utilization.

Also, if anyone else has other interesting ideas on how they handle lots
of over quota e-mail (besides shortening the time that e-mail is kept on the
server or rejecting that e-mail outright), I would be interested in hearing
about it.

Scott
-- 
 +-----------------------------------------------------------------------+
      Scott W. Adkins                http://www.cns.ohiou.edu/~sadkins/
   UNIX Systems Engineer                  mailto:adkinss at ohio.edu
        ICQ 7626282                 Work (740)593-9478 Fax (740)593-1944
 +-----------------------------------------------------------------------+
     PGP Public Key available at http://www.cns.ohiou.edu/~sadkins/pgp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 231 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20040514/8f266cd6/attachment.bin


More information about the Info-cyrus mailing list