Re: [Exim] IMAP quotas help needed

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: brian
Ημερομηνία:  
Προς: Jeffrey Wheat
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] IMAP quotas help needed
maildir_format = true

I think thats whats missing.

Note that code to support maildir or mailstore formats is not included in
the binary unless SUPPORT_MAILDIR or SUPPORT_MAILSTORE, respectively, is set
in Local/Makefile.

Not sure if = true has to be on it.. but its on mine and it works. Also the
M or K on the quota is optional... you can do this(in addtion to what I
outlined before):

MYSQL_QUOTA = SELECT DISTINCT (MYSQL_QUOTAFIELD*1024*1024) as quota FROM
MYSQL_AUTHTABLE WHERE MYSQL_DOMAINFIELD LIKE '${quote_mysql:$domain}' AND
MYSQL_USERNAMEFIELD LIKE '${quote_mysql:$local_part}' AND is_alias='N'

Thanks,
Brian


----- Original Message -----
From: "Jeffrey Wheat" <jeff@???>
To: <brian@???>
Sent: Wednesday, May 14, 2003 2:09 PM
Subject: RE: [Exim] IMAP quotas help needed


Brian,

Mine is:

# This transport is used for local delivery to user mailboxes
local_delivery:
  driver = appendfile
  check_string =
  create_directory
  delivery_date_add
  directory = /var/mail/cetlink.net/${local_part}/maildir
  directory_mode = 700
  envelope_to_add
  user = mail
  group = mail
  maildir_format
  maildir_tag = ,S=$message_size
  quota_size_regex = ,S=(\d+)
  message_prefix =
  message_suffix =
  quota = ${lookup mysql {MYSQL_QUOTA}}
  no_quota_is_inclusive
  quota_warn_message = "\
      To: $local_part@$domain\n\
      Subject: Your mailbox is almost full!\n\n\
      This message is automatically created \
      by mail delivery software (Exim), your email server at cetlink.net.\n\
      The size of your mailbox has exceeded a warning threshold\n\
      set by the System Administrator.\n\
      When you receive this message, it means that your current\n\
      mailbox size is approaching the limit. You need to clean up old
msgs.\n\
      If your e-mail software has a setting that leaves a copy of the
message on\n\
      the server, please also set the option that deletes the message\n\
      from the server when you delete your local copy."
  quota_warn_threshold = 75%
  return_path_add


> -----Original Message-----
> From: brian@??? [mailto:brian@bkw.org]
> Sent: Wednesday, May 14, 2003 2:20 PM
> To: Jeffrey Wheat
> Subject: Re: [Exim] IMAP quotas help needed
>
>
> virtual_delivery:
> driver = appendfile
> maildir_format = true
> directory = /export/home/${domain}/mail/${local_part}/Maildir
> user = ${lookup mysql {MYSQL_UID}}
> group = ${lookup mysql {MYSQL_GID}}
> mode = 0660
> maildir_tag = ,S=$message_size
> quota_size_regex = ,S=(\d+)
> quota = 50M
>
>
> Something like this is what I use.
>
> bkw
> ----- Original Message -----
> From: "Jeffrey Wheat" <jeff@???>
> To: <brian@???>
> Sent: Wednesday, May 14, 2003 1:13 PM
> Subject: RE: [Exim] IMAP quotas help needed
>
>
> Interesting. I never see the appendfile transport in my debugging.
>
> Jeff
>
> > -----Original Message-----
> > From: brian@??? [mailto:brian@bkw.org]
> > Sent: Wednesday, May 14, 2003 2:05 PM
> > To: Jeffrey Wheat
> > Subject: Re: [Exim] IMAP quotas help needed
> >
> >
> > I just did exim -d email@??? <-this being local.
> >
> > But I see where the format for your imapd and exim are
> > wanting diffrent input's for quota.. the concat query will do
> > that you want... i'm running exim 4.14
> >
> > In courierimap you use the single query at the bottom of the
> > authdmysqlrc file.. I don't have it setup like that yet but
> > in my testing on a box here seems to work.
> >
> > CONCAT(users.quota*1024*1024,'S') AS quota
> >
> > Then in exim you can do this:
> >
> > CONCAT(users.quota,'M') AS quota
> >
> > that way you only store even numbers in your db.
> >
> > I'm in the process of doing this so its been an adventure.
> >
> > bkw
> >
> >
> >
> > ----- Original Message -----
> > From: "Jeffrey Wheat" <jeff@???>
> > To: <brian@???>
> > Sent: Wednesday, May 14, 2003 12:53 PM
> > Subject: RE: [Exim] IMAP quotas help needed
> >
> >
> > Brian,
> >
> > I can't get that same type of output
> > of the appendfile transport as you show in
> > your email. I have tried a few various debug
> > flags without any result. What version of
> > exim are you running?
> >
> > Thanks,
> > Jeff
> >
> >
> > > -----Original Message-----
> > > From: brian@??? [mailto:brian@bkw.org]
> > > Sent: Wednesday, May 14, 2003 1:34 PM
> > > To: Jeffrey Wheat
> > > Cc: exim-users@???
> > > Subject: Re: [Exim] IMAP quotas help needed
> > >
> > >
> > > I think you have a little bit of misunderstanding on how
> > exim checks
> > > the
> > > quota:
> > >
> > > exim -d user@???(brian@??? in this example)
> > >
> > > appendfile transport entered
> > > appendfile: mode=660 notify_comsat=0 quota=52428800
> > > directory=/export/home/bkw.org/mail/brian/Maildir format=maildir
> > > message_prefix=null
> > > message_suffix=null
> > > quota checks on directory /export/home/bkw.org/mail/brian/Maildir
> > > check_dir_size:
> > dir=/export/home/bkw.org/mail/brian/Maildir/tmp sum=0
> > > count=1
> > > check_dir_size: dir=/export/home/bkw.org/mail/brian/Maildir/new
> > > sum=2651 count=3
> > > check_dir_size: dir=/export/home/bkw.org/mail/brian/Maildir/cur
> > > sum=1590351 count=343
> > > check_dir_size: dir=/export/home/bkw.org/mail/brian/Maildir
> > > sum=1593002 count=343 delivering in maildir format in
> > > /export/home/bkw.org/mail/brian/Maildir
> > > writing to file
> tmp/1052933575.H18708P62459.smtp-00.ssl-website.net
> > > Exim quota = 52428800 old size = 1593002 this message = 299
> > (included)
> > > file quota = 0 count = 343
> > > writing data block fd=6 size=299 timeout=0
> > > renaming temporary file
> > > renamed tmp/1052933575.H18708P62459.smtp-00.ssl-website.net
> > > as new/1052933575.H18708P62459.smtp-00.ssl-website.net
> > > appendfile yields 0 with errno=0 more_errno=0
> > > search_tidyup called
> > > journalling brian@???
> > > virtual_delivery transport returned OK for brian@???
> > post-process
> > > brian@??? (0) brian@??? delivered
> > >
> > >
> > > From what I can tell it checks the directory and not each file.
> > >
> > > bkw
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jeffrey Wheat" <jeff@???>
> > > To: <exim-users@???>
> > > Sent: Wednesday, May 14, 2003 12:20 PM
> > > Subject: [Exim] IMAP quotas help needed
> > >
> > >
> > > > I am trying to implement quotas on my mail servers
> > > > using exim 4.14 and courier-imap 1.7.1. I am using
> > > > mysql as the backend for all of my users, both local
> > > > and virtual, as well as maildir format. I have in my
> > exim.conf file
> > > > the following two settings for the delivery transports
> > > along with the
> > > > standard maildir
> > > > settings:
> > > > maildir_tag = ,S=$message_size
> > > > quota_size_regex = ,S=(\d+)
> > > >
> > > > I have in my authmysqlrc the required entry for the
> > > > quota field. There is a big difference in the format
> > > > used by exim and courier for the quota field, such as
> > > >
> > > > courier: 10000000S,200C
> > > > exim:    10M

> > > >
> > > > Where the courier quota format states 10Meg and 200 msgs
> > while the
> > > > exim format states 10Meg.
> > > >
> > > > Has anyone come up with a patch/hack/config that will
> > > > let my users get their quotas with IMAP's getquota command?
> > > >
> > > > I'd rather not have to use the courier "deliverquota" as an
> > > > external delivery agent in order to get this to work.
> > > >
> > > > Are there any plans to have exim build the maildirsize files?
> > > >
> > > > Many thanks!
> > > > Jeff
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
> > > >
> > > >
> > > > --
> > > >
> > > > ## List details at
> http://www.exim.org/mailman/listinfo/exim-> users
> > > > Exim
> >
> > details at http://www.exim.org/ ##
> > > >
> > >
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
> > >
> > >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
> >
> >
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
> >
> >
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 5/6/2003