Quota string

  • Vern Howard

    Vern Howard - 2007-05-17

    How can we have the quota string that is stored in the db include an S after the value?

    IE 10485760S. I keep getting a "WARN: quota string '10240000' not parseable" error from maildrop and most all the how-to have that the quota value end with an S.


    • Christian Boltz

      Christian Boltz - 2007-05-20

      You have to add it in the SQL query. Set the MYSQL_QUOTA_FIELD in /etc/authlib/authmysqlrc like this:

      MYSQL_QUOTA_FIELD       concat(quota,'S')

      My complete authmysqlrc, just in case you have more problems:

      MYSQL_SERVER            localhost
      MYSQL_USERNAME          **********
      MYSQL_PASSWORD          *************
      MYSQL_SOCKET            /var/lib/mysql/mysql.sock
      MYSQL_OPT               0
      MYSQL_DATABASE          mail
      MYSQL_USER_TABLE        mailbox
      MYSQL_CLEAR_PWFIELD     password
      # use static UID and GID
      MYSQL_UID_FIELD         '20000'
      MYSQL_GID_FIELD         '10002'
      MYSQL_LOGIN_FIELD       username
      MYSQL_HOME_FIELD        '/home/mailbox/'
      MYSQL_NAME_FIELD        name
      MYSQL_MAILDIR_FIELD     maildir
      MYSQL_QUOTA_FIELD       concat(quota,'S')
      MYSQL_WHERE_CLAUSE      active=1

    • Vern Howard

      Vern Howard - 2007-05-20

      Actually I am wondering if it is something that is put in the postfixadmin creat_mailbox.php file since that is what creates the quota value in the db and not the authmysqlrc which only authenticates against the db.

      • Christian Boltz

        Christian Boltz - 2007-05-21

        Doing it in authmysqlrc is the right thing[tm] - the quota database field is an int(10) and therefore can't contain the 'S' ;-)

        Sidenote: Your maildrop must be built against courier-authlib.
        Older maildrop versions came with their own code to access the database - in this case authmysqlrc is indeed the wrong place (and any outdated howto ;-) will tell you how the query must look like).


Log in to post a comment.