7 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Maildroprc and Quota
FromSent OnAttachments
Renato Otranto Jr.Oct 9, 2006 12:05 pm 
Barry FlanaganOct 9, 2006 2:47 pm 
Renato Otranto Jr.Oct 10, 2006 2:00 pm 
Barry FlanaganOct 10, 2006 2:25 pm 
Renato Otranto Jr.Oct 10, 2006 2:44 pm 
Sam VarshavchikOct 10, 2006 3:40 pm 
Barry FlanaganOct 11, 2006 3:03 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] Maildroprc and QuotaActions...
From:Renato Otranto Jr. (rena@rac.com.br)
Date:Oct 10, 2006 2:00:34 pm
List:net.sourceforge.lists.courier-maildrop

I think that maildrop gets the quota value from authlib, regardless of any Postfix supplied value. Your quota value as returned by authlib needs to include the 'S' on the end. If using MySQL for your data, set the MYSQL_QUOTA_FIELD to be concat(quota,'S') in your authmysqlrc

Hope this helps.

I already test it, but unsuccessful. Let me show my whole steps. I'm sorry by the long post...

My /etc/maildroprc:

----------------------------------------------------------- MAIL = "$HOME" QUOTA="$MAILDIRQUOTA"'S' `echo "$HOME --> $QUOTA" >> /tmp/result` `test -d $MAIL` if( $RETURNCODE == 1) { `maildirmake $MAIL` `maildirmake -q $QUOTA $MAIL` }

------------------------------------------------------------

When my LDAP_MAILDIRQUOTA in /etc/courier/authldaprc file is:

----------------------------------------------------------- LDAP_MAILDIRQUOTA mailQuotaSize

-----------------------------------------------------------

The maildrop -d comand reports:

--------------------------------------------------------------------------------------- maildrop -V 7 -d user@domain < /etc/fstab maildrop: authlib: groupid=108 maildrop: authlib: userid=108 maildrop: authlib: logname=user@domain, home=/var/maildirs/domain/user, mail=(default) maildrop: Changing to /var/maildirs/domain/user Message start at 0 bytes, envelope sender=user@domain /etc/courier/maildroprc(1): MAIL="/var/maildirs/domain/user" /etc/courier/maildroprc(2): QUOTA="40000000S" maildrop: Filtering through `echo "$HOME --> $QUOTA" >> /tmp/result` maildrop: Filtering through `test -d $MAIL` /etc/courier/maildroprc(7): Evaluating IF condition. /etc/courier/maildroprc(7): Operation on: 0 and 1 - equal, result is 0 /etc/courier/maildroprc(7): IF evaluated, result=0 maildrop: Attempting .mailfilter WARN: quota string '40000000' not parseable maildrop: Delivery complete.

---------------------------------------------------------------------------------------

As shown, the quota is read ok (QUOTA="40000000S")

And the /tmp/result reports:

/var/maildirs/domain/user --> 40000000S

(home --> quota)

If I change my LDAP_MAILDIRQUOTA in /etc/courier/authldaprc to:

----------------------------------------------------------- LDAP_MAILDIRQUOTA concat(mailQuotaSize,'S')

-----------------------------------------------------------

When I run the comand: maildrop -V 7 -d user@domain < /etc/fstab

The WARN is out, as follows:

-----------------------------------------------------------

maildrop -V 7 -d user@domain < /etc/fstab maildrop: authlib: groupid=108 maildrop: authlib: userid=108 maildrop: authlib: logname=user@domain, home=/var/maildirs/domain/user, mail=(default) maildrop: Changing to /var/maildirs/domain/user Message start at 0 bytes, envelope sender=user@domain /etc/courier/maildroprc(1): MAIL="/var/maildirs/domain/user" /etc/courier/maildroprc(2): QUOTA="S" maildrop: Filtering through `echo "$HOME --> $QUOTA" >> /tmp/result` maildrop: Filtering through `test -d $MAIL` /etc/courier/maildroprc(7): Evaluating IF condition. /etc/courier/maildroprc(7): Operation on: 0 and 1 - equal, result is 0 /etc/courier/maildroprc(7): IF evaluated, result=0 maildrop: Attempting .mailfilter maildrop: Delivery complete.

-----------------------------------------------------------

But the quota is presented as just an "S"

The /tmp/result has problem too (with quota), as follows:

------------------------------------------------------------------------------- /var/maildirs/domain/user --> S -------------------------------------------------------------------------------

The other problem related with maildrop is that when I send a message through Postfix to user that does not have maildir created yet, the maildir is created, but without the maildirsize. If I use the command

maildrop -V 7 -d user@domain < file

to send a message to a valid user in my LDAP base, but he does not have the maildir created yet, I get the error message "Unable to change to home directory"

When I create the maildirsize file running the comand:

maildirmake -q QUOTA Maildir

In a maildir already created, I can put the maildirsize file in the directory, but without result to "close" maildir when the limit is over.

Thanks