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

Re: Compiling problems - Dovecot SASL + SSL/TLS

Expand Messages
  • Wietse Venema
    ... You did not follow the SASL_README instructions. % make makefiles CCARGS= -DUSE_SASL_AUTH - DDEF_SERVER_SASL_TYPE= dovecot Wietse
    Message 1 of 6 , Jan 1, 2008
    • 0 Attachment
      Stephen McHenry:
      > I've been trying to do a fairly major upgrade to our mail servers,
      > switching to Dovecot (IMAP+SSL) and adding both SASL (we previously
      > used POP before SMTP) and SSL/TLS to Postfix (not trying to do
      > anything overly complicated with the TLS - just trying to avoid
      > sending AUTH passwords in the clear). The Dovecot part works fine. On
      > the Postfix side, I tried a "small steps" approach, first adding SASL,
      > and then adding TLS to that. The SASL part works fine. Compiles,
      > installs, works great.
      >
      > When I went to add the SSL/TLS part, I did (per the instructions) a
      > "make tidy" followed by:
      >
      > make makefiles CCARGS="-DUSE_SASL_AUTH
      > -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS -I/usr/local/include" \
      > AUXLIBS="-L/usr/local/lib -lssl -lcrypto"

      You did not follow the SASL_README instructions.

      % make makefiles CCARGS='-DUSE_SASL_AUTH -
      DDEF_SERVER_SASL_TYPE=\"dovecot\"'

      Wietse
    • Stephen McHenry
      ... Ah. Yes! (Drat!). Thanks. Now, I m running up against the linking problem that was in the second half (when I tried SSL/TLS w/o SASL). It appears to be
      Message 2 of 6 , Jan 1, 2008
      • 0 Attachment
        On Jan 1, 2008 4:49 PM, Wietse Venema <wietse@...> wrote:
        > Stephen McHenry:
        > > I've been trying to do a fairly major upgrade to our mail servers,
        > > switching to Dovecot (IMAP+SSL) and adding both SASL (we previously
        > > used POP before SMTP) and SSL/TLS to Postfix (not trying to do
        > > anything overly complicated with the TLS - just trying to avoid
        > > sending AUTH passwords in the clear). The Dovecot part works fine. On
        > > the Postfix side, I tried a "small steps" approach, first adding SASL,
        > > and then adding TLS to that. The SASL part works fine. Compiles,
        > > installs, works great.
        > >
        > > When I went to add the SSL/TLS part, I did (per the instructions) a
        > > "make tidy" followed by:
        > >
        > > make makefiles CCARGS="-DUSE_SASL_AUTH
        > > -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS -I/usr/local/include" \
        > > AUXLIBS="-L/usr/local/lib -lssl -lcrypto"
        >
        > You did not follow the SASL_README instructions.
        >
        > % make makefiles CCARGS='-DUSE_SASL_AUTH -
        > DDEF_SERVER_SASL_TYPE=\"dovecot\"'
        >
        > Wietse

        Ah. Yes! (Drat!). Thanks.

        Now, I'm running up against the linking problem that was in the second
        half (when I tried SSL/TLS w/o SASL). It appears to be looking for
        something it can't find, but I'm not sure what lib dlsym, dlerror,
        dlopen and dlclose are in...

        gcc -Wmissing-prototypes -Wformat -DUSE_TLS -I/usr/local/include
        -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DHAS_PCRE -g -O
        -I. -I../../include -DLINUX2 -o smtpd smtpd.o smtpd_token.o
        smtpd_check.o smtpd_chat.o smtpd_state.o smtpd_peer.o
        smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o smtpd_xforward.o
        smtpd_dsn_fix.o smtpd_milter.o ../../lib/libmaster.a
        ../../lib/libtls.a ../../lib/libdns.a ../../lib/libxsasl.a
        ../../lib/libmilter.a ../../lib/libglobal.a ../../lib/libutil.a
        -L/usr/local/lib -lssl -lcrypto -L/usr/lib -lpcre -ldb -lnsl -lresolv
        /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
        `dlfcn_bind_func':dso_dlfcn.c:(.text+0x27d): undefined reference to
        `dlsym'
        :dso_dlfcn.c:(.text+0x2f9): undefined reference to `dlerror'
        /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
        `dlfcn_bind_var':dso_dlfcn.c:(.text+0x36d): undefined reference to
        `dlsym'
        :dso_dlfcn.c:(.text+0x3e1): undefined reference to `dlerror'
        /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
        `dlfcn_unload':dso_dlfcn.c:(.text+0x44c): undefined reference to
        `dlclose'
        /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
        `dlfcn_load':dso_dlfcn.c:(.text+0x4f5): undefined reference to
        `dlopen'
        :dso_dlfcn.c:(.text+0x546): undefined reference to `dlclose'
        :dso_dlfcn.c:(.text+0x56f): undefined reference to `dlerror'
        collect2: ld returned 1 exit status

        Thanks in advance...
        --
        Stephen
      • Wietse Venema
        ... Postfix builds out of the box on Linux. Your compilation environment appears to be incomplete. I suggest you upgrade to a complete one. Wietse
        Message 3 of 6 , Jan 2, 2008
        • 0 Attachment
          Stephen McHenry:
          > On Jan 1, 2008 4:49 PM, Wietse Venema <wietse@...> wrote:
          > > Stephen McHenry:
          > > > I've been trying to do a fairly major upgrade to our mail servers,
          > > > switching to Dovecot (IMAP+SSL) and adding both SASL (we previously
          > > > used POP before SMTP) and SSL/TLS to Postfix (not trying to do
          > > > anything overly complicated with the TLS - just trying to avoid
          > > > sending AUTH passwords in the clear). The Dovecot part works fine. On
          > > > the Postfix side, I tried a "small steps" approach, first adding SASL,
          > > > and then adding TLS to that. The SASL part works fine. Compiles,
          > > > installs, works great.
          > > >
          > > > When I went to add the SSL/TLS part, I did (per the instructions) a
          > > > "make tidy" followed by:
          > > >
          > > > make makefiles CCARGS="-DUSE_SASL_AUTH
          > > > -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS -I/usr/local/include" \
          > > > AUXLIBS="-L/usr/local/lib -lssl -lcrypto"
          > >
          > > You did not follow the SASL_README instructions.
          > >
          > > % make makefiles CCARGS='-DUSE_SASL_AUTH -
          > > DDEF_SERVER_SASL_TYPE=\"dovecot\"'
          > >
          > > Wietse
          >
          > Ah. Yes! (Drat!). Thanks.
          >
          > Now, I'm running up against the linking problem that was in the second
          > half (when I tried SSL/TLS w/o SASL). It appears to be looking for
          > something it can't find, but I'm not sure what lib dlsym, dlerror,
          > dlopen and dlclose are in...

          Postfix builds out of the box on Linux. Your compilation environment
          appears to be incomplete. I suggest you upgrade to a complete one.

          Wietse
        • Stephen McHenry
          ... Hmm... well, apparently a freshly built complete Fedora 5 installation is also incomplete, as it failed there too.... But, I did figure it out, and
          Message 4 of 6 , Jan 2, 2008
          • 0 Attachment
            On Jan 2, 2008 4:02 AM, Wietse Venema <wietse@...> wrote:
            > Stephen McHenry:
            > > On Jan 1, 2008 4:49 PM, Wietse Venema <wietse@...> wrote:
            > > > Stephen McHenry:
            > > > > I've been trying to do a fairly major upgrade to our mail servers,
            > > > > switching to Dovecot (IMAP+SSL) and adding both SASL (we previously
            > > > > used POP before SMTP) and SSL/TLS to Postfix (not trying to do
            > > > > anything overly complicated with the TLS - just trying to avoid
            > > > > sending AUTH passwords in the clear). The Dovecot part works fine. On
            > > > > the Postfix side, I tried a "small steps" approach, first adding SASL,
            > > > > and then adding TLS to that. The SASL part works fine. Compiles,
            > > > > installs, works great.
            > > > >
            > > > > When I went to add the SSL/TLS part, I did (per the instructions) a
            > > > > "make tidy" followed by:
            > > > >
            > > > > make makefiles CCARGS="-DUSE_SASL_AUTH
            > > > > -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS -I/usr/local/include" \
            > > > > AUXLIBS="-L/usr/local/lib -lssl -lcrypto"
            > > >
            > > > You did not follow the SASL_README instructions.
            > > >
            > > > % make makefiles CCARGS='-DUSE_SASL_AUTH -
            > > > DDEF_SERVER_SASL_TYPE=\"dovecot\"'
            > > >
            > > > Wietse
            > >
            > > Ah. Yes! (Drat!). Thanks.
            > >
            > > Now, I'm running up against the linking problem that was in the second
            > > half (when I tried SSL/TLS w/o SASL). It appears to be looking for
            > > something it can't find, but I'm not sure what lib dlsym, dlerror,
            > > dlopen and dlclose are in...
            >
            > Postfix builds out of the box on Linux. Your compilation environment
            > appears to be incomplete. I suggest you upgrade to a complete one.
            >
            > Wietse

            Hmm... well, apparently a freshly built "complete" Fedora 5
            installation is also incomplete, as it failed there too....

            But, I did figure it out, and thought posting the solution here might
            help anyone else who has this problem...

            Turns out, it was not finding libdl.a.

            libdl.a _was_ present in /usr/lib, so it was just a matter of adding
            it.to the AUXLIBS and that cleared up the problem.



            --
            Stephen

            Stephen McHenry
          • Wietse Venema
            ... FYI, Fedora Core 5 has not been fresh for three releases. ... I routinely build Postfix on Linux without needing to add libdl.a manually to the library
            Message 5 of 6 , Jan 2, 2008
            • 0 Attachment
              Stephen McHenry:
              > > > Now, I'm running up against the linking problem that was in the second
              > > > half (when I tried SSL/TLS w/o SASL). It appears to be looking for
              > > > something it can't find, but I'm not sure what lib dlsym, dlerror,
              > > > dlopen and dlclose are in...
              > >
              > > Postfix builds out of the box on Linux. Your compilation environment
              > > appears to be incomplete. I suggest you upgrade to a complete one.
              >
              > Hmm... well, apparently a freshly built "complete" Fedora 5
              > installation is also incomplete, as it failed there too....

              FYI, Fedora Core 5 has not been fresh for three releases.

              > But, I did figure it out, and thought posting the solution here might
              > help anyone else who has this problem...
              >
              > Turns out, it was not finding libdl.a.
              >
              > libdl.a _was_ present in /usr/lib, so it was just a matter of adding
              > it.to the AUXLIBS and that cleared up the problem.

              I routinely build Postfix on Linux without needing to add libdl.a
              manually to the library list, and I have not heard from other people
              who need to do that, either.

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