E-Mail Server Ubuntu SQL Error











up vote
0
down vote

favorite












I've been trying to set up a server but it doesn't work. I got this error:




23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




Here my config:




driver = mysql
connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"
default_pass_scheme = SHA512-CRYPT

password_query = SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $

user_query = SELECT username AS user, domain, password FROM accounts WHERE username = '%n$

iterate_query = SELECT username, domain FROM accounts where sendonly = false;




My setup: I have installed mariadb, dovecot, postfix, postfixadmin.



When I create an email account with postfixadmin and use the same database with dovecot, I got the error. What am I doing wrong?



I'm not very experienced. If you need more informations, please ask.










share|improve this question




























    up vote
    0
    down vote

    favorite












    I've been trying to set up a server but it doesn't work. I got this error:




    23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




    Here my config:




    driver = mysql
    connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"
    default_pass_scheme = SHA512-CRYPT

    password_query = SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $

    user_query = SELECT username AS user, domain, password FROM accounts WHERE username = '%n$

    iterate_query = SELECT username, domain FROM accounts where sendonly = false;




    My setup: I have installed mariadb, dovecot, postfix, postfixadmin.



    When I create an email account with postfixadmin and use the same database with dovecot, I got the error. What am I doing wrong?



    I'm not very experienced. If you need more informations, please ask.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I've been trying to set up a server but it doesn't work. I got this error:




      23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




      Here my config:




      driver = mysql
      connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"
      default_pass_scheme = SHA512-CRYPT

      password_query = SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $

      user_query = SELECT username AS user, domain, password FROM accounts WHERE username = '%n$

      iterate_query = SELECT username, domain FROM accounts where sendonly = false;




      My setup: I have installed mariadb, dovecot, postfix, postfixadmin.



      When I create an email account with postfixadmin and use the same database with dovecot, I got the error. What am I doing wrong?



      I'm not very experienced. If you need more informations, please ask.










      share|improve this question















      I've been trying to set up a server but it doesn't work. I got this error:




      23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




      Here my config:




      driver = mysql
      connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"
      default_pass_scheme = SHA512-CRYPT

      password_query = SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $

      user_query = SELECT username AS user, domain, password FROM accounts WHERE username = '%n$

      iterate_query = SELECT username, domain FROM accounts where sendonly = false;




      My setup: I have installed mariadb, dovecot, postfix, postfixadmin.



      When I create an email account with postfixadmin and use the same database with dovecot, I got the error. What am I doing wrong?



      I'm not very experienced. If you need more informations, please ask.







      ubuntu email mysql






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 16 at 23:29









      fixer1234

      17.3k144280




      17.3k144280










      asked Nov 16 at 23:16









      Cyberpunk7711

      32




      32






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The error you have is as follows; bold emphasis is mine:




          23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




          The query value you have set is as follows; again bold emphasis is mine:




          SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $




          Seems like that is a problem. But also some of the queries oddly have a $ at the end of them like these:



          SELECT NULL AS password, 'Y' as nopassword, userid AS user  FROM users $
          SELECT username AS user, domain, password FROM accounts WHERE username = '%n$


          It looks like you copied and pasted these queries from some command line output that truncated the queries. The solution? Get the actual full queries and place them in the config.



          Also, what is this about?



          driver = mysql connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"


          Why are those two driver and connect values on the same line?



          In general, the overall format quirks you are seeing makes the config seem like a mess. No easy way for us to solve it, but basically I would recommend rewriting the config properly with full queries, quotes around values (if the config works that way) and properly setting each value on each line.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376123%2fe-mail-server-ubuntu-sql-error%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            The error you have is as follows; bold emphasis is mine:




            23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




            The query value you have set is as follows; again bold emphasis is mine:




            SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $




            Seems like that is a problem. But also some of the queries oddly have a $ at the end of them like these:



            SELECT NULL AS password, 'Y' as nopassword, userid AS user  FROM users $
            SELECT username AS user, domain, password FROM accounts WHERE username = '%n$


            It looks like you copied and pasted these queries from some command line output that truncated the queries. The solution? Get the actual full queries and place them in the config.



            Also, what is this about?



            driver = mysql connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"


            Why are those two driver and connect values on the same line?



            In general, the overall format quirks you are seeing makes the config seem like a mess. No easy way for us to solve it, but basically I would recommend rewriting the config properly with full queries, quotes around values (if the config works that way) and properly setting each value on each line.






            share|improve this answer

























              up vote
              0
              down vote



              accepted










              The error you have is as follows; bold emphasis is mine:




              23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




              The query value you have set is as follows; again bold emphasis is mine:




              SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $




              Seems like that is a problem. But also some of the queries oddly have a $ at the end of them like these:



              SELECT NULL AS password, 'Y' as nopassword, userid AS user  FROM users $
              SELECT username AS user, domain, password FROM accounts WHERE username = '%n$


              It looks like you copied and pasted these queries from some command line output that truncated the queries. The solution? Get the actual full queries and place them in the config.



              Also, what is this about?



              driver = mysql connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"


              Why are those two driver and connect values on the same line?



              In general, the overall format quirks you are seeing makes the config seem like a mess. No easy way for us to solve it, but basically I would recommend rewriting the config properly with full queries, quotes around values (if the config works that way) and properly setting each value on each line.






              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                The error you have is as follows; bold emphasis is mine:




                23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




                The query value you have set is as follows; again bold emphasis is mine:




                SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $




                Seems like that is a problem. But also some of the queries oddly have a $ at the end of them like these:



                SELECT NULL AS password, 'Y' as nopassword, userid AS user  FROM users $
                SELECT username AS user, domain, password FROM accounts WHERE username = '%n$


                It looks like you copied and pasted these queries from some command line output that truncated the queries. The solution? Get the actual full queries and place them in the config.



                Also, what is this about?



                driver = mysql connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"


                Why are those two driver and connect values on the same line?



                In general, the overall format quirks you are seeing makes the config seem like a mess. No easy way for us to solve it, but basically I would recommend rewriting the config properly with full queries, quotes around values (if the config works that way) and properly setting each value on each line.






                share|improve this answer












                The error you have is as follows; bold emphasis is mine:




                23:59:43 mail dovecot: auth-worker(14604): Error: sql(test@mydomain.eu, ip): Password query failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' ROM users WHERE userid = 'test@mydomain.eu' and mysql_pass = password('psw' at line 1.




                The query value you have set is as follows; again bold emphasis is mine:




                SELECT NULL AS password, 'Y' as nopassword, userid AS user FROM users $




                Seems like that is a problem. But also some of the queries oddly have a $ at the end of them like these:



                SELECT NULL AS password, 'Y' as nopassword, userid AS user  FROM users $
                SELECT username AS user, domain, password FROM accounts WHERE username = '%n$


                It looks like you copied and pasted these queries from some command line output that truncated the queries. The solution? Get the actual full queries and place them in the config.



                Also, what is this about?



                driver = mysql connect = "host=127.0.0.1 dbname=dbname user=userdb password=psw"


                Why are those two driver and connect values on the same line?



                In general, the overall format quirks you are seeing makes the config seem like a mess. No easy way for us to solve it, but basically I would recommend rewriting the config properly with full queries, quotes around values (if the config works that way) and properly setting each value on each line.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 at 23:40









                JakeGould

                30.6k1093135




                30.6k1093135






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376123%2fe-mail-server-ubuntu-sql-error%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...