View previous topic :: View next topic |
Author |
Message |
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Fri Mar 27, 2009 7:13 am Post subject: Virtual mail hosting quota with postfix/courier how? |
|
|
I just finished the setup guide here: http://en.gentoo-wiki.com/wiki/Virtual_Mail_Server_setup_with_Postfix,_Courier_and_PostfixAdmin and I am now wondering how to set up quotas for the virtual mailboxes.
the only information I've gotten so far is to enable the vda useflag for postfix, but I dont see a way to manage the quota in Postfixadmin, and I don't know if there is a command in the imap server to verify that the quota is set properly. any help? _________________ John5788 |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Mon Mar 30, 2009 1:09 am Post subject: |
|
|
i still havent been able to get quotas working, but I found some more information.
I set this config in my /etc/courier/authlib/authmysqlrc
Code: | MYSQL_QUOTA_FIELD quota |
set this in my main.cf
Code: | ##############################################
# VIRTMAIL QUOTA #
##############################################
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual-mailbox-limit-maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
virtual_overquota_bounce = yes
virtual_mailbox_limit_override = yes
virtual_mailbox_limit = 30720000
virtual_mailbox_limit_inbox = no |
and created the cf file for the virtual mailbox limit
Code: | user = postfix
password = password
dbname = postfix
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1' |
however, I cant get roundcube to report a proper disk quota at the bottom. has anyone ever done this properly? _________________ John5788 |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Mon Mar 30, 2009 11:37 pm Post subject: |
|
|
a setting in postfixadmin's config needed to be turned on which allowed me to set the quota and actually works.
however, the quota does not affect the trash folder, does anyone know why? _________________ John5788 |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Tue Mar 31, 2009 7:24 am Post subject: |
|
|
looks like courier-imap is installed that way by default, not reading the trash as part of the quota. however, there is a compiler flag,
Code: | * --with-trashquota - include deleted messages, and the Trash folder, in
the estimated quota usage for maildirs. Quotas are optional, see the
file maildir/README.maildirquota.html for more information. The
default configuration does not count messages marked as deleted (but
not yet expunged) and the contents of the Trash folder (which are
automatically purged by the server) against the quota usage. NOTE - if
this option is used, make check WILL FAIL. You should first configure
Courier-IMAP without this option, run make check, then reconfigure
Courier-IMAP with this option. |
Someone posted up custom ebuilds that would let you enable it as a useflag on the bugzilla, https://bugs.gentoo.org/173394, but no one has bothered to merge it into standard portage tree yet. anyone know why? is there a way around this besides dropping the custom ebuild in? _________________ John5788 |
|
Back to top |
|
|
|