9 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] converting from maild...
FromSent OnAttachments
HeikoAug 19, 2008 12:03 am 
HeikoAug 19, 2008 12:09 am 
Sam VarshavchikAug 19, 2008 4:02 am 
HeikoAug 19, 2008 4:18 am 
HeikoAug 19, 2008 4:54 am 
Sam VarshavchikAug 19, 2008 3:25 pm 
Sam VarshavchikAug 19, 2008 3:26 pm 
HeikoAug 20, 2008 12:53 am 
Sam VarshavchikAug 20, 2008 4:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] converting from maildroprc quota to mysql quotaActions...
From:Heiko (rupe@gmail.com)
Date:Aug 19, 2008 4:18:38 am
List:net.sourceforge.lists.courier-maildrop

On Tue, Aug 19, 2008 at 1:03 PM, Sam Varshavchik <mrs@courier-mta.com> wrote:

Heiko writes:

Hello, i have a 2 machine courier cluster which served only one domain in the past, but now we have a second domain, up to now we used quota for the maildir that was definded in the /etc/maildroprc ( `echo 52428800S >> $VHOME/$USERDOMAIN/$ACCOUNT/maildirsize`). now we would like to set the quota inside the DB, which is already used for postfix/courier authentification, and there is also already a quota field:

+-------------------------+----------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra |

+-------------------------+----------------------------------+------+-----+---------+-------+ | email | varchar(255) | NO | PRI | NULL | | | domain | varchar(255) | NO | MUL | NULL | | | firstname | varchar(50) | YES | | NULL | | | fullname | varchar(100) | YES | | NULL | | | mailboxtype | enum('person','group','service') | NO | | NULL | | | password_encrypt | char(13) | NO | | NULL | | | password_sha1 | char(40) | NO | | NULL | | | quota_byte | int(10) unsigned | NO | | NULL | | | use_imap | enum('true','false') | NO | | true | | | use_directsmtp | enum('true','false') | NO | | true | | | mailhost | varchar(100) | NO | MUL | NULL | | | lastchanged_timestamp | timestamp | YES | | NULL | | | deleterequest_timestamp | timestamp | YES | | NULL | |

what is the easiest way to use this quota field instead of the maildroprc?

You'll have to configure courier-authlib to use a custom query. maildrop expects the quota field to be the same as it would appear in maildirsize, such as "52428800S", however you have defined your quota field to be an int. Therefore, you will need to set up a custom query that retrieves this field and appends an "S" to it. See the comments in authmysqlrc for more information.

Hello Sam,

so I have to customize the query in /etc/postfix/mysql-virtual_mailbox_limit_maps.cf or somewhere inside the courier or maildrop configs? Looks like this was wrong all the time, that why it didnt work in the first time :(. my authmysqlrc looks like this:

MYSQL_SERVER 192.2.2.101 MYSQL_USERNAME postfix MYSQL_PASSWORD mail MYSQL_PORT 0 MYSQL_DATABASE mail MYSQL_USER_TABLE users MYSQL_CRYPT_PWFIELD password_encrypt #MYSQL_CLEAR_PWFIELD password MYSQL_UID_FIELD 5000 MYSQL_GID_FIELD 5000 MYSQL_LOGIN_FIELD email MYSQL_HOME_FIELD "/home/vmail" MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') #MYSQL_MAILDIR_FIELD maildir # CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') #MYSQL_NAME_FIELD MYSQL_QUOTA_FIELD quota_byte MYSQL_AUXOPTIONS_FIELD CONCAT("mailhost=",mailhost)

greetings

Rupertt