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

Etusivu
Poista viesti
Vastaa
Lähettäjä: Silmar A. Marca
Päiväys:  
Vastaanottaja: Mark Hynes
Kopio: exim-users
Aihe: Re: [Exim] Courier Maildirsize MaildirMake DeliveryQuota (exim 4.20)
MYSQL_QUOTAX = SELECT CONCAT((domain.quotas + popbox.quotas) * 1048576,"S",
(domain.quotac + popbox.quotac),"C") FROM popbox LEFT JOIN domain ON (
popbox.domain_name = domain.domain_name ) WHERE
popbox.local_part='${quote_mysql:${local_part}}' AND
popbox.domain_name='${quote_mysql:${domain}}' AND domain.ativo='1'

MYSQL_DIRECTORY = SELECT
CONCAT(domain.home,'/mails/',popbox.local_part,'/Maildir') FROM popbox LEFT
JOIN domain ON ( popbox.domain_name = domain.domain_name ) WHERE
popbox.local_part='${quote_mysql:${local_part}}' AND
popbox.domain_name='${quote_mysql:${domain}}' AND domain.ativo='1' AND
popbox.ativo='1'

Observation: I'm have now this queries running in a virtual mysql domains and
users, but only "maildirsize" dont create to run imap "GETQUOTA ROOT"...

Cordialmente, Silmar A. Marca
GrupoGSN - Desenvolvimento, Implantação e Verificação de Servidores
Profissionais baseados em Linux/Novell
http://www.grupogsn.com.br/~marca/
------------------------------------------------------------
Se algo não lhe faz mal (fisico, moral ou psicologicamente),
experimente! O máximo e você perder tempo! E tempo, e
o que você tem a vida toda pra perder.....
Mais vale um instante de prazer que uma eternidade fútil!
------------------------------------------------------------



Citando Mark Hynes <mark.hynes@???>:

> 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 |

>