Re: [Exim] Enforce quotas using Maildirs and MySQL

Etusivu
Poista viesti
Vastaa
Lähettäjä: Anand Buddhdev
Päiväys:  
Vastaanottaja: Robert Cotran
Kopio: exim-users
Aihe: Re: [Exim] Enforce quotas using Maildirs and MySQL
On Wed, Apr 14, 2004 at 04:32:27PM -0400, Robert Cotran wrote:

> Hi all,


Hi Robert,

> Has anyone succesfully managed to enforce quotas on incoming mail using
> Maildirs and MySQL with Exim? I have a field in my users table which
> has the quota but right now it's not doing anything. If anyone does
> have a system, please let me know. Thanks!


Yes, I'm doing this. I recommend you to use the latest version of exim
(4.32) which has much improved Maildir++ quota support, which will
work with sqwebmail and courier-imap. In your router, look up the
quota value from your mysql table, and in your local_delivery
transport, add lines like this to get quota enforcement:

router:

local_user:
  driver = accept
  address_data = ${lookup mysql {select quota from table where \
                 username='$local_part'} {$value} fail }
  transport = local_delivery
  cannot_route_message = Unknown user


transport:

local_delivery:
driver = appendfile
directory = /path/to/user/Maildir
maildir_format
maildir_tag = ,S=$message_size
maildir_use_size_file
quota = $address_data
delivery_date_add
envelope_to_add
return_path_add

Edit the router and transport to suit your setup.

--
Anand Buddhdev
Celtel International