Re: [Exim] Courier Maildirsize MaildirMake DeliveryQuota (ex…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mark Hynes
Dátum:  
Címzett: Silmar A. Marca
CC: exim-users
Tárgy: Re: [Exim] Courier Maildirsize MaildirMake DeliveryQuota (exim 4.20)
On Sep 02, Silmar A. Marca wrote:
> I need to make a file "maildirsize" in root of "home" user to read imap command
> "GETQUOTA ROOT" for a imp/courier.
> This is ok if I run "maildirmake" every message...
> For a real users I'm use (this is ok!)
> --------------------------------------------------------------------------------
> -->Routers
> local_domain_maildirsize:
>   driver                = accept
>   check_local_user
>   transport             = local_delivery_maildirsize
>   domains               = DOM_LOCAL : DOM_ALIAS
>   unseen
> local_domain:
>   driver                = accept
>   check_local_user
>   transport             = local_delivery
>   domains               = DOM_LOCAL : DOM_ALIAS
> -->Transport
> local_delivery_maildirsize:
>   driver                = pipe
>   return_output
>   log_defer_output
>   log_fail_output
>   command               = "/usr/bin/maildirmake -q 33554432S,500C
> $home/Maildir"
>   group                 = mail
>   user                  = $local_part
> local_delivery:
>   driver                = appendfile
>   directory             = $home/Maildir
>   group                 = mail
>   quota                 = 32M
>   quota_filecount       = 500
>   maildir_format
>   maildir_tag           = ,S=$message_size
>   quota_size_regex      = ,S=(\d+)
>   create_directory

>
> --------------------------------------------------------------------------------
> But, I need to use this for a virtual user, and "virtual quota". If run a
> command:
> command = "/usr/bin/maildirmake -q ${lookup mysql{MYSQL_QUOTAX}{$value}fail}
> ${lookup mysql{MYSQL_DIRECTORY}{$value}fail}"
> or
> command = /usr/bin/maildirmake -q ${lookup mysql{MYSQL_QUOTAX}{$value}fail}
> ${lookup mysql{MYSQL_DIRECTORY}{$value}fail}
> or
> command = "/usr/bin/maildirmake -q mysql;MYSQL_QUOTAX mysql;MYSQL_DIRECTORY"
> or
> command = /usr/bin/maildirmake -q mysql;MYSQL_QUOTAX mysql;MYSQL_DIRECTORY
>
> this command is fail... exim dont make a query...
>
> I try to use:
> home_directory        = ${lookup mysql{MYSQL_DIRECTORY}{$value}fail}
> command               = "/usr/bin/maildirmake -q 33554432S,500C ${home}"
> and... this is OK! But quota dont is a real quota... quota is in mysql select
> and mysql select dont run!

>
> Whow to make a "maildirsize" using quota and home stored in mysql?? My version
> of exim is 4.20.
> Have a "$run" command to run in "driver = appendfile" and get mysql data? Or
> have a internal instruction to make a maildirsize file?? Format of maildirsize
> is very simple!
> ->
> 33554432S,500C
> 1308794 19
> ->
> The first line is quotasize+S,quota_filecount+C
> The second line is size actual and count files


I still think you're going about this the wrong way - If you use "deliverquota"
it will take care of the maildir creation and quota updating for you, and then
you don't need to bother with maildirmake

Why your mysql queries aren't working is another matter - if you post what
your MYSQL_ macros are I'm sure someone will be able to help.

--
| Mark Hynes           mark.hynes@??? |
| Service Developer   http://www.uk.easynet.net/ |
| Easynet Ltd   --   a part of Easynet Group plc |