Can`t create mailbox v2.3.1

node49
2010-08-17
2013-01-23
  • node49

    node49 - 2010-08-17

    I create domains but can`t create mailboxes:

    DEBUG INFORMATION:
    Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 5

    Database is new, MySQL v.5.0.51a-24-log, OS Debian 5. What should I do?

    PS The same error appears when I try to create alias for mailbox. When I try to view http://my_server/list-virtual.php?domain=my_domain I got another error:

    Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( quota.path='quota/storage' OR quota.path IS NULL ) ORDER BY mailbox.usernam' at line 4

     
  • Christian Boltz

    Christian Boltz - 2010-08-17

    The error in list-virtual is known and will be fixed in postfixadmin 2.3.2. If you need the fix now, replace functions.inc.php and list-virtual.php with the files from the 2.3 branch - https://postfixadmin.svn.sourceforge.net/svnroot/postfixadmin/branches/postfixadmin-2.3

    The error in create-mailbox sounds new to me. Can you please add some debugging code?
    open functions.inc.php and find (in function db_query):

    or $error_text = "<p />DEBUG INFORMATION:<br />Invalid query: " . mysql_error($link) . "$DEBUG_TEXT";
    

    and append $query after $DEBUG_TEXT - it should look like:

    or $error_text = "<p />DEBUG INFORMATION:<br />Invalid query: " . mysql_error($link) . "$DEBUG_TEXT - $query";
    

    This code exists 3 times in function db_query (depending on your $CONF - make sure you modify the one you use or simply edit all 3 ;-)

     
  • node49

    node49 - 2010-08-17

    This is the result:

    DEBUG INFORMATION:
    Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 5

    Please check the documentation and website for more information.

    Postfix Admin
    Forums - SELECT alias.address FROM alias LEFT JOIN mailbox ON alias.address=mailbox.username WHERE (alias.domain='kirov.rus.coop' AND mailbox.maildir IS NULL) ORDER BY alias.address LIMIT -1, 1

     
  • Christian Boltz

    Christian Boltz - 2010-08-17

    After reading the code, I guess you have set $CONF = 0
    Needless to say that displaying zero items per page is not very useful ;-)

    Please change $CONF to a higher value.
    If your intention was to have it unlimited: that's currently not supported, but displaying 10000 items per page should also work ;-)

    BTW: 2.3.2 will have a check for this - a clear error message is always better than a failing query…

     
  • node49

    node49 - 2010-08-18

    Yes, $CONF where "0" cause i thought "0" means unlimited items per page. Now it`s work! :)
    Thank you! Waiting for v2.3.2

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks