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

Re: postfix and Berkeley DB

Expand Messages
  • Sahil Tandon
    ... So, you did not explicitly link against a non-default DB library. ... As documented, Postfix uses the default Berkeley DB version that ships with your
    Message 1 of 9 , Apr 11, 2013
    • 0 Attachment
      On Thu, 2013-04-11 at 16:35:28 -0600, LuKreme wrote:

      > # ldd /usr/local/libexec/postfix/smtpd
      > /usr/local/libexec/postfix/smtpd:
      > libmysqlclient.so.16 => /usr/local/lib/mysql/libmysqlclient.so.16 (0x280cf000)
      > libz.so.3 => /lib/libz.so.3 (0x28139000)
      > libm.so.4 => /lib/libm.so.4 (0x2814a000)
      > libssl.so.7 => /usr/local/lib/libssl.so.7 (0x28160000)
      > libcrypto.so.7 => /usr/local/lib/libcrypto.so.7 (0x281ad000)
      > libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x2830a000)
      > libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28321000)
      > libc.so.6 => /lib/libc.so.6 (0x28354000)
      > libcrypt.so.3 => /lib/libcrypt.so.3 (0x2843b000)

      So, you did not explicitly link against a non-default DB library.

      > # file /etc/postfix/virtual.db
      > /etc/postfix/virtual.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
      >
      > So, postfix appears to be using Berkeley DB but is not linked against it?

      As documented, Postfix uses the default Berkeley DB version that ships
      with your system, which I am assuming is FreeBSD. You can alter this
      behavior by explicitly linking against a different, non-default DB
      version, which would then appear in ldd(1) output. Or, you can disable
      Berkeley DB support entirely by including -DNO_DB in CCARGS.

      --
      Sahil Tandon
    • LuKreme
      ... I assure you it is. This is exactly why I am puzzled, though Sahil may have provided the answer (see below) I built postfix with: make -f Makefile.init
      Message 2 of 9 , Apr 12, 2013
      • 0 Attachment
        In our previous episode (Thursday, 11-Apr-2013), Reindl Harald said:
        > i can not imagine that this file is created by the postfix
        > of which you posted the ld-output because it is not linked
        > against it

        I assure you it is. This is exactly why I am puzzled, though Sahil may have provided the answer (see below)

        I built postfix with:

        make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include/mysql -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/lib/mysql -lmysqlclient -lz -lm -lssl -lcrypto -L/usr/local/lib -lsasl2'

        # postconf -m
        btree
        cidr
        environ
        hash
        internal
        mysql
        pcre
        proxy
        regexp
        static
        tcp
        texthash
        unix

        In our previous episode (Thursday, 11-Apr-2013), Sahil Tandon said:
        > As documented, Postfix uses the default Berkeley DB version that ships
        > with your system, which I am assuming is FreeBSD.

        Yes, FreeBSD VeryOld-stable.

        Then which of the libdb.so files on the system is postfix using?

        # locate libdb.so
        /usr/local/lib/db42/libdb.so
        /usr/local/lib/db44/libdb.so
        /usr/local/lib/db48/libdb.so

        I can recompile linking against the db48 version, as I assume that is the best choice.

        --
        'And I promise you this,' he [Carrot] shouted, 'if we succeed, no-one
        will remember. And if we fail, no one will forget!'
      • Wietse Venema
        LuKreme: [ Charset windows-1252 unsupported, converting... ] ... Which on FreeBSD uses the system berkeley DB 1.85. ... Yes if Postfix has to inter-operate
        Message 3 of 9 , Apr 12, 2013
        • 0 Attachment
          LuKreme:
          [ Charset windows-1252 unsupported, converting... ]
          > In our previous episode (Thursday, 11-Apr-2013), Reindl Harald said:
          > > i can not imagine that this file is created by the postfix
          > > of which you posted the ld-output because it is not linked
          > > against it
          >
          > I assure you it is. This is exactly why I am puzzled, though Sahil may have provided the answer (see below)
          >
          > I built postfix with:
          >
          > make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include/mysql -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/lib/mysql -lmysqlclient -lz -lm -lssl -lcrypto -L/usr/local/lib -lsasl2'
          >

          Which on FreeBSD uses the system berkeley DB 1.85.

          > Then which of the libdb.so files on the system is postfix using?
          >
          > # locate libdb.so
          > /usr/local/lib/db42/libdb.so
          > /usr/local/lib/db44/libdb.so
          > /usr/local/lib/db48/libdb.so
          >
          > I can recompile linking against the db48 version, as I assume that is the best choice.
          >

          Yes if Postfix has to inter-operate with programs that insist on db48.

          FreeBSD supports multiple Berkeley DB versions in the same program
          (each version uses distinct function names internally, so there are
          no DLL hell problems).

          Wietse
        • Sahil Tandon
          ... None. Postfix is using libc, which appears in your ldd(1) output, and contains the Berkeley DB 1.85 routines. ... These were installed via ports; not part
          Message 4 of 9 , Apr 13, 2013
          • 0 Attachment
            On Fri, 2013-04-12 at 05:10:09 -0600, LuKreme wrote:

            > ...
            > In our previous episode (Thursday, 11-Apr-2013), Sahil Tandon said:
            > > As documented, Postfix uses the default Berkeley DB version that ships
            > > with your system, which I am assuming is FreeBSD.
            >
            > Yes, FreeBSD VeryOld-stable.
            >
            > Then which of the libdb.so files on the system is postfix using?

            None. Postfix is using libc, which appears in your ldd(1) output, and
            contains the Berkeley DB 1.85 routines.

            > # locate libdb.so
            > /usr/local/lib/db42/libdb.so
            > /usr/local/lib/db44/libdb.so
            > /usr/local/lib/db48/libdb.so

            These were installed via ports; not part of base system, and irrelevant
            given the way you built Postfix.

            --
            Sahil Tandon
          • LuKreme
            ... Ah-hah, thank you for that. --
            Message 5 of 9 , Apr 15, 2013
            • 0 Attachment
              On 13 Apr 2013, at 09:29 , Sahil Tandon <sahil+postfix@...> wrote:

              > None. Postfix is using libc, which appears in your ldd(1) output, and
              > contains the Berkeley DB 1.85 routines.

              Ah-hah, thank you for that.


              --
            Your message has been successfully submitted and would be delivered to recipients shortly.