Discussion:
configure: error: could not find sasl lib
DGSJ
2017-12-28 23:21:49 UTC
Permalink
Hello,

I'm building mutt-1.9.2 from source, and I'm having a problem with sasl in
the ./configure stage:

./configure --prefix=/usr --enable-imap --enable-smtp --enable-debug \
--with-ssl --with-gnutls --with-sasl SENDMAIL="/usr/local/bin/msmtp"

And this is the error:
checking whether SSL_set_mode is declared... yes
checking whether SSL_MODE_AUTO_RETRY is declared... yes
checking whether X509_V_FLAG_PARTIAL_CHAIN is declared... yes
checking for library containing sasl_encode64... no
configure: error: could not find sasl lib

but, I have already installed sasl, both GNU SASL an Cyrus sasl.

root [ /home/daniel ]# ldconfig -p | grep sasl
libsasl2.so.2 (libc6,x86-64) =>
/usr/lib/x86_64-linux-gnu/libsasl2.so.2
libgsasl.so.7 (libc6,x86-64) => /usr/lib/libgsasl.so.7
libgsasl.so (libc6,x86-64) => /usr/lib/libgsasl.so

When I try to send a mail, mutt displays this error.

-- Mutt: Compose [Approx. msg size: 0.1K Atts: 1]-------------------
SMTP authentication requires SASL

It it interesting to note that my SENDMAIL goes fine. I can send mails
with msmtp from the console:

daniel [ ~ ]$ echo "hello there $USER" | msmtp -a default ***@gmail.com
daniel [ ~ ]$ cat /var/log/msmtp.log
Dec 25 20:21:44 host=smtp.gmail.com tls=on auth=on user=***@gmail.com \
from=***@gmail.com recipients=***@gmail.com mailsize=84
smtpstatus=250 \
smtpmsg='250 2.0.0 OK 1514229704 g16sm38241283wra.38 - gsmtp'
exitcode=EX_OK

Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
find:

From ***@gmail.com Wed Dec 27 23:09:31 2017
Date: Wed, 27 Dec 2017 23:09:31 +0100
From: DGSJ <***@gmail.com>
To: ***@gmail.com
Subject: prueba mutt
Message-ID: <***@lucu-hp>
MIME-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.9.2 (2017-12-15)
Status: RO
Content-Length: 87
Lines: 6
(body of the mail----)

I've installed mutt in several computers, even with the sasl libraries
also build from source, and this is the first time I have a problem.

In this case I'm using a Xubuntu OS (4.10.0-42-generic), and I have build
the libraries installing the Debian packages with apt-get install:
libgnitls-dev
libssl-dev
libsecret-1-dev
libgsasl7-dev

Well, that's all. Any help will be welcomed.

Thank you in advance for your help.
--
-------------------------
Daniel Gutiérrez San José
Cameron Simpson
2017-12-29 20:28:53 UTC
Permalink
Post by DGSJ
Hello,
I'm building mutt-1.9.2 from source, and I'm having a problem with sasl in
./configure --prefix=/usr --enable-imap --enable-smtp --enable-debug \
--with-ssl --with-gnutls --with-sasl SENDMAIL="/usr/local/bin/msmtp"
checking whether SSL_set_mode is declared... yes
checking whether SSL_MODE_AUTO_RETRY is declared... yes
checking whether X509_V_FLAG_PARTIAL_CHAIN is declared... yes
checking for library containing sasl_encode64... no
configure: error: could not find sasl lib
but, I have already installed sasl, both GNU SASL an Cyrus sasl.
root [ /home/daniel ]# ldconfig -p | grep sasl
libsasl2.so.2 (libc6,x86-64) =>
/usr/lib/x86_64-linux-gnu/libsasl2.so.2
libgsasl.so.7 (libc6,x86-64) => /usr/lib/libgsasl.so.7
libgsasl.so (libc6,x86-64) => /usr/lib/libgsasl.so
Often the library header files etc required for compilation are in separate
packages, eg a libsasl package and a libsasl-devel package. What's your
platform and what sasl package does it have installed?
Post by DGSJ
When I try to send a mail, mutt displays this error.
-- Mutt: Compose [Approx. msg size: 0.1K Atts: 1]-------------------
SMTP authentication requires SASL
Yes, built without SASL, so no support regardless of the library being present.
Post by DGSJ
It it interesting to note that my SENDMAIL goes fine. I can send mails
And did it come from a package, or did you build it?

[...]
Post by DGSJ
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
The tail of your message from this point seems to be missing.

Cheers,
Cameron Simpson <***@cskk.id.au> (formerly ***@zip.com.au)
Todd Zullinger
2017-12-29 21:04:43 UTC
Permalink
Post by Cameron Simpson
Post by DGSJ
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
The tail of your message from this point seems to be missing.
Perhaps you're reading this from an mbox and the leading
From_ line was not escaped Cameron? It's present in the
Post by Cameron Simpson
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
Date: Wed, 27 Dec 2017 23:09:31 +0100
Subject: prueba mutt
MIME-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.9.2 (2017-12-15)
Status: RO
Content-Length: 87
Lines: 6
(body of the mail----)
I've installed mutt in several computers, even with the sasl libraries
also build from source, and this is the first time I have a problem.
In this case I'm using a Xubuntu OS (4.10.0-42-generic), and I have build
libgnitls-dev
libssl-dev
libsecret-1-dev
libgsasl7-dev
The debian mutt packages build with Cyrus SASL (from
libsasl2-dev).

I don't known if mutt supports GNU SASL or not. If GNU SASL
is completely compatible, perhaps you need to pass the
proper path to it with --with-sasl. Unless you have a
specific need for GNU SASL, I'd just install libsasl2-dev
and build mutt using that SASL implementation.
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Love is a snowmobile racing across the tundra. Suddenly it flips,
pinning you underneath. At night, the ice weasels come.
-- Matt Groening
Cameron Simpson
2017-12-30 21:29:08 UTC
Permalink
Post by Todd Zullinger
Post by Cameron Simpson
Post by DGSJ
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
The tail of your message from this point seems to be missing.
Perhaps you're reading this from an mbox and the leading
From_ line was not escaped Cameron? It's present in the
Post by Cameron Simpson
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
Date: Wed, 27 Dec 2017 23:09:31 +0100
[...]

Nice catch. I am. This points to a bug in my mailfiler. I'll go chase it.

Thanks Todd!
Cameron Simpson <***@cskk.id.au> (formerly ***@zip.com.au)
Cameron Simpson
2017-12-30 21:33:06 UTC
Permalink
Post by Cameron Simpson
Post by Todd Zullinger
Post by Cameron Simpson
The tail of your message from this point seems to be missing.
Perhaps you're reading this from an mbox and the leading
From_ line was not escaped Cameron? It's present in the
[...]
Post by Cameron Simpson
Nice catch. I am. This points to a bug in my mailfiler. I'll go chase it.
Yep:

diff --git a/lib/python/cs/app/mailfiler.py b/lib/python/cs/app/mailfiler.py
--- a/lib/python/cs/app/mailfiler.py
+++ b/lib/python/cs/app/mailfiler.py
@@ -505,7 +505,7 @@ def save_to_folderpath(folderpath, M, me
if len(x_status) > 0:
M['X-Status'] = x_status
with LogExceptions():
- text = M.as_string(True)
+ text = M.as_string(True).replace('\nFrom ', '\n>From ')
with open(folderpath, "a") as mboxfp:
mboxfp.write(text)
info(" OK >> %s" % (shortpath(folderpath)))

Applied and installed. Thanks for the head up!

Cheers,
Cameron Simpson <***@cskk.id.au> (formerly ***@zip.com.au)
Daniel G.
2018-01-13 10:46:29 UTC
Permalink
Post by Todd Zullinger
Post by Cameron Simpson
Post by DGSJ
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
The tail of your message from this point seems to be missing.
Perhaps you're reading this from an mbox and the leading
From_ line was not escaped Cameron? It's present in the
Post by Cameron Simpson
Another interesting thing is that although mutt doesn't finally send the
mail, msmtp reports it as sent. I mean that in the sent file of msmtp you can
Date: Wed, 27 Dec 2017 23:09:31 +0100
Subject: prueba mutt
MIME-Version: 1.0
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.9.2 (2017-12-15)
Status: RO
Content-Length: 87
Lines: 6
(body of the mail----)
I've installed mutt in several computers, even with the sasl libraries
also build from source, and this is the first time I have a problem.
In this case I'm using a Xubuntu OS (4.10.0-42-generic), and I have build
libgnitls-dev
libssl-dev
libsecret-1-dev
libgsasl7-dev
The debian mutt packages build with Cyrus SASL (from
libsasl2-dev).
I don't known if mutt supports GNU SASL or not. If GNU SASL
is completely compatible, perhaps you need to pass the
proper path to it with --with-sasl. Unless you have a
specific need for GNU SASL, I'd just install libsasl2-dev
and build mutt using that SASL implementation.
Hi again,
I just wanted to report the end of the story. I have finally installed mutt in a
16.04.1-Ubuntu with smstp and mutt built from source.

And these are the required libraries.
msmtp:
libgsasl7-dev
libgnutls-dev
libssl-dev
libsecret-1-dev

mutt:
libncurses5-dev
libsasl2-dev (as you pointed out)

Thank you all.
Post by Todd Zullinger
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Love is a snowmobile racing across the tundra. Suddenly it flips,
pinning you underneath. At night, the ice weasels come.
-- Matt Groening
--
----------------
Daniel Gutiérrez
Loading...