admin Site Admin
Joined: 21 Jun 2005 Posts: 209
|
Posted: Tue Aug 01, 2006 10:09 pm Post subject: How to configure Postfix & Courier IMAP with quota suppo |
|
|
I found the documentation for setting up quota support under postfix a little sparse so i've written this quick howto.
Download and apply the VDA quota patch from http://web.onda.com.br/nadal/
Setup your MySQL tables so that there is a field for quotas. My setup is based on the instructions at http://high5.net/howto/ so if you have followed this you should already have the correct fields.
If you are using Postfix Admin, check that you have enabled quota support in the config file.
Enable quota support in Courier-IMAP. This needs to be done in 2 places. Firstly in /etc/courier/authmysqlrc:
MYSQL_QUOTA_FIELD quota
And also in /etc/courier/imapd:
IMAP_CAPABILITY="IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA"
Tell Postfix to lookup quotas in a MySQL table:
/etc/postfix/main.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = secret
hosts = 127.0.0.1
dbname = postfix
table = mailbox
select_field = quota
where_field = username
You will also need the following settings for quotas to work in Postfix & Courier-IMAP:
/etc/postfix/main.cf
# Override the message_size_limit setting
virtual_mailbox_limit_override = yes
# Follow Maildir++ specs
virtual_maildir_extended = yes
# Create the maildirsize file (Vital for Courier-IMAP)
virtual_create_maildirsize = yes
# Bounce rather than defer when over quota
virtual_overquota_bounce = yes |
|