Loading ...
Sorry, an error occurred while loading the content.
 

Re: sqlite driver and centos

Expand Messages
  • Brian Evans - Postfix List
    ... You might like this from the archives... http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
    Message 1 of 13 , Aug 2 6:02 AM
      On 8/2/2010 5:18 AM, subscriber@... wrote:
      > I use postfix with sqlite patch about 2 years with small fix to function
      > name. I
      > suggest to make something like this for postfix 2.8. Or maybe check sqlite
      > version at compile time and use ifdef's.

      You might like this from the archives...
      http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
    • subscriber@viliar.net.ru
      On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List ... function ... Thank you. Do you think I should re-post it in that thread? I didn t find there
      Message 2 of 13 , Aug 2 6:10 AM
        On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
        <grknight@...> wrote:
        > On 8/2/2010 5:18 AM, subscriber@... wrote:
        >> I use postfix with sqlite patch about 2 years with small fix to
        function
        >> name. I
        >> suggest to make something like this for postfix 2.8. Or maybe check
        >> sqlite
        >> version at compile time and use ifdef's.
        >
        > You might like this from the archives...
        > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html

        Thank you. Do you think I should re-post it in that thread? I didn't find
        there any relevant posts to this problem.
      • Wietse Venema
        ... Especially if you can also post concrete code for solving this. Otherwise, the Postfix xqlite driver is unlikely to change. Wietse
        Message 3 of 13 , Aug 2 11:36 AM
          subscriber@...:
          > On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
          > <grknight@...> wrote:
          > > On 8/2/2010 5:18 AM, subscriber@... wrote:
          > >> I use postfix with sqlite patch about 2 years with small fix to
          > function
          > >> name. I
          > >> suggest to make something like this for postfix 2.8. Or maybe check
          > >> sqlite
          > >> version at compile time and use ifdef's.
          > >
          > > You might like this from the archives...
          > > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
          >
          > Thank you. Do you think I should re-post it in that thread? I didn't find
          > there any relevant posts to this problem.

          Especially if you can also post concrete code for solving this.
          Otherwise, the Postfix xqlite driver is unlikely to change.

          Wietse
        • subscriber@viliar.net.ru
          On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema ... find ... certainly. ... +++ ./src/global/dict_sqlite.c 2010-08-03 17:18:20.000000000 +0400 @@ -200,7
          Message 4 of 13 , Aug 3 6:20 AM
            On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema
            <wietse@...> wrote:
            > subscriber@...:
            >> On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
            >> <grknight@...> wrote:
            >> > On 8/2/2010 5:18 AM, subscriber@... wrote:
            >> >> I use postfix with sqlite patch about 2 years with small fix to
            >> function
            >> >> name. I
            >> >> suggest to make something like this for postfix 2.8. Or maybe check
            >> >> sqlite
            >> >> version at compile time and use ifdef's.
            >> >
            >> > You might like this from the archives...
            >> > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
            >>
            >> Thank you. Do you think I should re-post it in that thread? I didn't
            find
            >> there any relevant posts to this problem.
            >
            > Especially if you can also post concrete code for solving this.
            > Otherwise, the Postfix xqlite driver is unlikely to change.
            >
            > Wietse

            certainly.

            --- ./src/global/dict_sqlite.c.orig 2010-08-03 17:17:52.000000000 +0400
            +++ ./src/global/dict_sqlite.c 2010-08-03 17:18:20.000000000 +0400
            @@ -200,7 +200,7 @@ static const char *dict_sqlite_lookup(DI
            msg_info("%s: %s: Searching with query %s",
            myname, dict_sqlite->parser->name, vstring_str(query));

            - if (sqlite3_prepare_v2(dict_sqlite->db, vstring_str(query), -1,
            + if (sqlite3_prepare(dict_sqlite->db, vstring_str(query), -1,
            &sql_stmt, &query_remainder) != SQLITE_OK)
            msg_fatal("%s: %s: SQL prepare failed: %s\n",
            myname, dict_sqlite->parser->name,


            :-)
          • subscriber@viliar.net.ru
            On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema ... find ... Pardon. We have to also remove sqlite version or change it to something apropriate. ... +++
            Message 5 of 13 , Aug 3 6:40 AM
              On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema
              <wietse@...> wrote:
              > subscriber@...:
              >> On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
              >> <grknight@...> wrote:
              >> > On 8/2/2010 5:18 AM, subscriber@... wrote:
              >> >> I use postfix with sqlite patch about 2 years with small fix to
              >> function
              >> >> name. I
              >> >> suggest to make something like this for postfix 2.8. Or maybe check
              >> >> sqlite
              >> >> version at compile time and use ifdef's.
              >> >
              >> > You might like this from the archives...
              >> > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
              >>
              >> Thank you. Do you think I should re-post it in that thread? I didn't
              find
              >> there any relevant posts to this problem.
              >
              > Especially if you can also post concrete code for solving this.
              > Otherwise, the Postfix xqlite driver is unlikely to change.
              >
              > Wietse

              Pardon. We have to also remove sqlite version or change it to something
              apropriate.

              --- ./src/global/dict_sqlite.c.orig 2010-08-03 17:37:29.000000000 +0400
              +++ ./src/global/dict_sqlite.c 2010-08-03 17:37:48.000000000 +0400
              @@ -67,10 +67,6 @@
              #ifdef HAS_SQLITE
              #include <sqlite3.h>

              -#if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004)
              -#error "Your SQLite version is too old"
              -#endif
              -
              /* Utility library. */

              #include <msg.h>
              @@ -200,7 +196,7 @@ static const char *dict_sqlite_lookup(DI
              msg_info("%s: %s: Searching with query %s",
              myname, dict_sqlite->parser->name, vstring_str(query));

              - if (sqlite3_prepare_v2(dict_sqlite->db, vstring_str(query), -1,
              + if (sqlite3_prepare(dict_sqlite->db, vstring_str(query), -1,
              &sql_stmt, &query_remainder) != SQLITE_OK)
              msg_fatal("%s: %s: SQL prepare failed: %s\n",
              myname, dict_sqlite->parser->name,
            • Wietse Venema
              ... If you want Postfix to support the obsolete API then you cannot remove support for the preferred API. Wietse
              Message 6 of 13 , Aug 3 7:43 AM
                subscriber@...:
                > On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema
                > <wietse@...> wrote:
                > > subscriber@...:
                > >> On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
                > >> <grknight@...> wrote:
                > >> > On 8/2/2010 5:18 AM, subscriber@... wrote:
                > >> >> I use postfix with sqlite patch about 2 years with small fix to
                > >> function
                > >> >> name. I
                > >> >> suggest to make something like this for postfix 2.8. Or maybe check
                > >> >> sqlite
                > >> >> version at compile time and use ifdef's.
                > >> >
                > >> > You might like this from the archives...
                > >> > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
                > >>
                > >> Thank you. Do you think I should re-post it in that thread? I didn't
                > find
                > >> there any relevant posts to this problem.
                > >
                > > Especially if you can also post concrete code for solving this.
                > > Otherwise, the Postfix xqlite driver is unlikely to change.
                > >
                > > Wietse
                >
                > Pardon. We have to also remove sqlite version or change it to something
                > apropriate.

                If you want Postfix to support the obsolete API then you
                cannot remove support for the preferred API.

                Wietse

                > --- ./src/global/dict_sqlite.c.orig 2010-08-03 17:37:29.000000000 +0400
                > +++ ./src/global/dict_sqlite.c 2010-08-03 17:37:48.000000000 +0400
                > @@ -67,10 +67,6 @@
                > #ifdef HAS_SQLITE
                > #include <sqlite3.h>
                >
                > -#if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004)
                > -#error "Your SQLite version is too old"
                > -#endif
                > -
                > /* Utility library. */
                >
                > #include <msg.h>
                > @@ -200,7 +196,7 @@ static const char *dict_sqlite_lookup(DI
                > msg_info("%s: %s: Searching with query %s",
                > myname, dict_sqlite->parser->name, vstring_str(query));
                >
                > - if (sqlite3_prepare_v2(dict_sqlite->db, vstring_str(query), -1,
                > + if (sqlite3_prepare(dict_sqlite->db, vstring_str(query), -1,
                > &sql_stmt, &query_remainder) != SQLITE_OK)
                > msg_fatal("%s: %s: SQL prepare failed: %s\n",
                > myname, dict_sqlite->parser->name,
                >
                >
                >
                >
                >
                >
              • subscriber@viliar.net.ru
                On Tue, 3 Aug 2010 10:43:56 -0400 (EDT), Wietse Venema ... check ... Sorry for delay with answer. I ll send this diff as workaround. Because I m not a
                Message 7 of 13 , Sep 9, 2010
                  On Tue, 3 Aug 2010 10:43:56 -0400 (EDT), Wietse Venema
                  <wietse@...> wrote:
                  > subscriber@...:
                  >> On Mon, 2 Aug 2010 14:36:35 -0400 (EDT), Wietse Venema
                  >> <wietse@...> wrote:
                  >> > subscriber@...:
                  >> >> On Mon, 02 Aug 2010 09:02:41 -0400, Brian Evans - Postfix List
                  >> >> <grknight@...> wrote:
                  >> >> > On 8/2/2010 5:18 AM, subscriber@... wrote:
                  >> >> >> I use postfix with sqlite patch about 2 years with small fix to
                  >> >> function
                  >> >> >> name. I
                  >> >> >> suggest to make something like this for postfix 2.8. Or maybe
                  check
                  >> >> >> sqlite
                  >> >> >> version at compile time and use ifdef's.
                  >> >> >
                  >> >> > You might like this from the archives...
                  >> >> > http://archives.neohapsis.com/archives/postfix/2010-06/0539.html
                  >> >>
                  >> >> Thank you. Do you think I should re-post it in that thread? I didn't
                  >> find
                  >> >> there any relevant posts to this problem.
                  >> >
                  >> > Especially if you can also post concrete code for solving this.
                  >> > Otherwise, the Postfix xqlite driver is unlikely to change.
                  >> >
                  >> > Wietse
                  >>
                  >> Pardon. We have to also remove sqlite version or change it to something
                  >> apropriate.
                  >
                  > If you want Postfix to support the obsolete API then you
                  > cannot remove support for the preferred API.

                  Sorry for delay with answer. I'll send this diff as workaround. Because
                  I'm not a programmer/coder. Probably correct decision is using some another
                  ifdefs here.

                  P.S. For me it's not a problem to live with own patched postfix as I do
                  now. But the way you integrate sqlite support in postfix - is a 'kick off'
                  CentOS 5 users from using postfix 2.8. It wouldn't compile anymore and I
                  don't think is good. How much people will search&patch&compile postfix on
                  their own?
                  P.S2. It's not about flame.
                • Wietse Venema
                  ... Will this work? Unfortunately I can t test Postfix myself on every version of everything. Wietse ... *************** *** 68,74 **** #include
                  Message 8 of 13 , Sep 9, 2010
                    subscriber@...:
                    > > If you want Postfix to support the obsolete API then you
                    > > cannot remove support for the preferred API.
                    >
                    > Sorry for delay with answer. I'll send this diff as workaround. Because
                    > I'm not a programmer/coder. Probably correct decision is using some another
                    > ifdefs here.
                    >
                    > P.S. For me it's not a problem to live with own patched postfix as I do
                    > now. But the way you integrate sqlite support in postfix - is a 'kick off'
                    > CentOS 5 users from using postfix 2.8. It wouldn't compile anymore and I
                    > don't think is good. How much people will search&patch&compile postfix on
                    > their own?
                    > P.S2. It's not about flame.

                    Will this work? Unfortunately I can't test Postfix myself on every
                    version of everything.

                    Wietse

                    *** ./dict_sqlite.c- Fri Jun 18 20:19:15 2010
                    --- ./dict_sqlite.c Thu Sep 9 11:01:12 2010
                    ***************
                    *** 68,74 ****
                    #include <sqlite3.h>

                    #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004)
                    ! #error "Your SQLite version is too old"
                    #endif

                    /* Utility library. */
                    --- 68,74 ----
                    #include <sqlite3.h>

                    #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004)
                    ! #define sqlite3_prepare_v2 sqlite3_prepare
                    #endif

                    /* Utility library. */
                  • subscriber@viliar.net.ru
                    On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema ... I ... on ... 3005004) ... 3005004) ... Thank you, I ll check it today later.
                    Message 9 of 13 , Sep 9, 2010
                      On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema
                      <wietse@...> wrote:
                      > subscriber@...:
                      >> > If you want Postfix to support the obsolete API then you
                      >> > cannot remove support for the preferred API.
                      >>
                      >> Sorry for delay with answer. I'll send this diff as workaround. Because
                      >> I'm not a programmer/coder. Probably correct decision is using some
                      >> another
                      >> ifdefs here.
                      >>
                      >> P.S. For me it's not a problem to live with own patched postfix as I do
                      >> now. But the way you integrate sqlite support in postfix - is a 'kick
                      >> off'
                      >> CentOS 5 users from using postfix 2.8. It wouldn't compile anymore and
                      I
                      >> don't think is good. How much people will search&patch&compile postfix
                      on
                      >> their own?
                      >> P.S2. It's not about flame.
                      >
                      > Will this work? Unfortunately I can't test Postfix myself on every
                      > version of everything.
                      >
                      > Wietse
                      >
                      > *** ./dict_sqlite.c- Fri Jun 18 20:19:15 2010
                      > --- ./dict_sqlite.c Thu Sep 9 11:01:12 2010
                      > ***************
                      > *** 68,74 ****
                      > #include <sqlite3.h>
                      >
                      > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                      3005004)
                      > ! #error "Your SQLite version is too old"
                      > #endif
                      >
                      > /* Utility library. */
                      > --- 68,74 ----
                      > #include <sqlite3.h>
                      >
                      > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                      3005004)
                      > ! #define sqlite3_prepare_v2 sqlite3_prepare
                      > #endif
                      >
                      > /* Utility library. */

                      Thank you, I'll check it today later.
                    • subscriber@viliar.net.ru
                      On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema ... 3005004) ... 3005004) ... Right now I have checked postfix compile and postconf out. Everything
                      Message 10 of 13 , Sep 10, 2010
                        On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema
                        <wietse@...> wrote:
                        > Will this work? Unfortunately I can't test Postfix myself on every
                        > version of everything.
                        >
                        > Wietse
                        >
                        > *** ./dict_sqlite.c- Fri Jun 18 20:19:15 2010
                        > --- ./dict_sqlite.c Thu Sep 9 11:01:12 2010
                        > ***************
                        > *** 68,74 ****
                        > #include <sqlite3.h>
                        >
                        > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                        3005004)
                        > ! #error "Your SQLite version is too old"
                        > #endif
                        >
                        > /* Utility library. */
                        > --- 68,74 ----
                        > #include <sqlite3.h>
                        >
                        > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                        3005004)
                        > ! #define sqlite3_prepare_v2 sqlite3_prepare
                        > #endif
                        >
                        > /* Utility library. */


                        Right now I have checked postfix compile and postconf out. Everything
                        fine. Don't check only real work with sqlite database. I can do it later.

                        # cat /etc/redhat-release
                        CentOS release 5.5 (Final)
                        # postconf | grep mail_version
                        mail_version = 2.8-20100829
                        milter_macro_v = $mail_name $mail_version
                        # postconf -m
                        btree
                        cidr
                        environ
                        hash
                        internal
                        nis
                        pcre
                        proxy
                        regexp
                        sqlite
                        static
                        tcp
                        unix


                        Thank you again!
                      • Wietse Venema
                        ... I looked up the API documentation, and it should work, but no-one knows until it has been tested on a real system. Wietse
                        Message 11 of 13 , Sep 10, 2010
                          subscriber@...:
                          > On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema
                          > <wietse@...> wrote:
                          > > Will this work? Unfortunately I can't test Postfix myself on every
                          > > version of everything.
                          > >
                          > > Wietse
                          > >
                          > > *** ./dict_sqlite.c- Fri Jun 18 20:19:15 2010
                          > > --- ./dict_sqlite.c Thu Sep 9 11:01:12 2010
                          > > ***************
                          > > *** 68,74 ****
                          > > #include <sqlite3.h>
                          > >
                          > > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                          > 3005004)
                          > > ! #error "Your SQLite version is too old"
                          > > #endif
                          > >
                          > > /* Utility library. */
                          > > --- 68,74 ----
                          > > #include <sqlite3.h>
                          > >
                          > > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                          > 3005004)
                          > > ! #define sqlite3_prepare_v2 sqlite3_prepare
                          > > #endif
                          > >
                          > > /* Utility library. */
                          >
                          >
                          > Right now I have checked postfix compile and postconf out. Everything
                          > fine. Don't check only real work with sqlite database. I can do it later.

                          I looked up the API documentation, and it should work, but no-one knows
                          until it has been tested on a real system.

                          Wietse
                        • subscriber@viliar.net.ru
                          On Fri, 10 Sep 2010 08:27:12 -0400 (EDT), Wietse Venema ... later. ... First time, then I try to use postfix with sqlite patch and small correct about function
                          Message 12 of 13 , Sep 10, 2010
                            On Fri, 10 Sep 2010 08:27:12 -0400 (EDT), Wietse Venema
                            <wietse@...> wrote:
                            > subscriber@...:
                            >> On Thu, 9 Sep 2010 11:06:07 -0400 (EDT), Wietse Venema
                            >> <wietse@...> wrote:
                            >> > Will this work? Unfortunately I can't test Postfix myself on every
                            >> > version of everything.
                            >> >
                            >> > Wietse
                            >> >
                            >> > *** ./dict_sqlite.c- Fri Jun 18 20:19:15 2010
                            >> > --- ./dict_sqlite.c Thu Sep 9 11:01:12 2010
                            >> > ***************
                            >> > *** 68,74 ****
                            >> > #include <sqlite3.h>
                            >> >
                            >> > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                            >> 3005004)
                            >> > ! #error "Your SQLite version is too old"
                            >> > #endif
                            >> >
                            >> > /* Utility library. */
                            >> > --- 68,74 ----
                            >> > #include <sqlite3.h>
                            >> >
                            >> > #if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER <
                            >> 3005004)
                            >> > ! #define sqlite3_prepare_v2 sqlite3_prepare
                            >> > #endif
                            >> >
                            >> > /* Utility library. */
                            >>
                            >>
                            >> Right now I have checked postfix compile and postconf out. Everything
                            >> fine. Don't check only real work with sqlite database. I can do it
                            later.
                            >
                            > I looked up the API documentation, and it should work, but no-one knows
                            > until it has been tested on a real system.
                            >
                            > Wietse

                            First time, then I try to use postfix with sqlite patch and small correct
                            about function (sqlite3_prepare) is December 2008. As you now, first of all
                            I have a look at sqlite API documentation and write a letter to author of
                            sqlite patch. Sorry for link, I wrote about it then in my blog
                            http://blog.viliar.net.ru/2008/03/12/opensource%D1%86/ (in russian) In
                            production on a small loads I using it for own mail server about half of
                            year. So, you can look on it as on example of real usage :-)
                          Your message has been successfully submitted and would be delivered to recipients shortly.