My own opinion is it's not worth the time to write an IMAP
interface to just check a users Quota.  Anything that doesn't
mean you have to get directly at the Email, I just pull it
out of the DB.

If you did it in IMAP you would have to open a connection for
each user (I'd imagine).  So you would have to get their
password, etc, etc.  With a script you just connect to the
DB, select userid, curmail_size, maxmail_size from dbmail_users;
Then your script just happily parses through all the names
and sends the Email.

We do have some more complex routines that we run to do things
like select the messages in the SPAM mailboxes over 2 weeks
old and delete them, same with the Trash.  Those are difficult
queries, and joins, but it all can be done.

I do recommend that if you choose to modify the DB directly that
you stick to simple changes and let the dbmail-util do the hard
work.  For example, as above, we find the messages and then set
the message status to a 2, so it becomes eligible for delete
and purge when we run dbmail-util each night.

--
David A. Niblett               | email: [EMAIL PROTECTED]
Network Administrator          | Phone: (352) 334-3400
Gainesville Regional Utilities | Web: http://www.gru.net/
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andrea Fino
Sent: Thursday, May 18, 2006 12:42 PM
To: DBMail mailinglist
Subject: Re: [Dbmail] quota


Niblett, David A wrote:

>We run a script that looks through the database each night
>and if a user is >=95% of their quota we send them an Email letting 
>them know.
>
>We also use it as a placeholder to see if they haven't read
>it in 30 days time, at which point we do nothing currently, just 
>statistic gathering.  Eventually we may archive their Email and delete 
>their box when it's full.
>
>  
>
Thanks for the info. I have looked a bit at the thing, and generally 
speaking I am trying to understand if is better to use an imap interface

(so to implement a little imap client in python/perl/whatever) or to act

directly on top of the db, for this kind of things.

Also I am trying to understand which kind of things can be implemented 
from the fact we have all emails on a db.

Any hints?

Regards,
Andrea Fino

-- 
Andrea Fino 8-) - "Sistemi su misura di qualita' industriale"
      "Handcrafted systems with industrial quality"
[Web: http://www.faino.org ]+[Email: [EMAIL PROTECTED] ]

_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to