Menu

Error with Postfix Admin all of a sudden, Mysql related

2022-08-16
2022-08-18
  • Dean Ansari

    Dean Ansari - 2022-08-16

    Greetings,

    We have had a PostfixAdmin installation for sometime and it has been working just fine.
    But all of a sudden as of yesterday when trying to access the Domain list for a given domain, that is this page:

    https://anoox.com/postfixadmin/list-virtual.php?domain=anoox.com

    We are getting the following Error:

    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 'row FROM mailbox LEFT JOIN alias ON mailbox.username=alias.address LEFT JOIN' at line 2

    Check your error_log for the failed query.

    Can one the good people here please tell me what is the solution to this Error?
    And FYI i work for a small non-profit Social network so we have very little people resources for
    such an esoteric problem as here with PostfixAdmin, so really appreciate your help in this matter.

    Regards,
    Dean

     
  • GingerDog

    GingerDog - 2022-08-16

    Hi Dean

    I would suspect that your version of MySQL has been updated by your hosting company, and that's causing problems.

    From looking at https://anoox.com/postfixadmin/login.php - it says you're running Postfixadmin 2.92, which is quite old.

    I'd suggest you try and find the webserver's error log (perhaps /var/log/httpd/error.log ?) and see if that gives more information about what it didn't like in the SQL.

     
  • Dean Ansari

    Dean Ansari - 2022-08-17

    Helklo GD,

    1st, thanks for your reply. So in response:

    1- We run a dedicated server so no one has access to it to update something such as Mysql except for us and we did not do so

    2- From the Web servers Error log here is what we get when we try to access this page:

    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 'row
    FROM mailbox \n LEFT JOIN alias ON mailbox.username=alias.address LEFT JOIN' at line 2,
    referer: https://anoox.com/postfixadmin/list-domain.php

    caused by query: \n SELECT * FROM (\n SELECT mailbox.username AS label, @row := @row + 1 AS row
    FROM mailbox LEFT JOIN alias ON mailbox.username=alias.address
    LEFT JOIN vacation ON mailbox.username=vacation.email \n WHERE mailbox.domain='anoox.com' \n ORDER BY mailbox.username \n )
    idx WHERE MOD(idx.row, 10) IN (0,9) OR idx.row = 10\n , referer: https://anoox.com/postfixadmin/list-domain.php

    FYI we have other domains hosted on this server and their emails admined via this Postfixadmin and we can access all their page for: https://anoox.com/postfixadmin/list-virtual.php?domain=xyz.com
    Ok. It is just when going to anoox.com where this page fails with above Error.

    FYI I did some research in this area and it seems if you have more than 10 email boxes this Postfixadmin occurs. And this seems to be the case that is other domains have less than 10 email boxes and anoox.com has more than 10.

    Much thanks before hand for your answer to this problem.

    Dean @ Anoox.com

     
  • GingerDog

    GingerDog - 2022-08-18

    I can't easily search the discussion here (sourceforge is slow/clunky).

    Try changing the pagination size settings in config.inc.php and see if that makes any difference?

    Can you run that SQL manually on the MySQL command line ? (it works for me, but I don't know what version of MySQL you're trying to use).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.