Bug 244937

Summary: [patch] Unbreak buildworld for sendmail and SMTP Authentication
Product: Documentation Reporter: Eugene Grosbein <eugen>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Some People CC: bcr, jnaughto, jwdevel, paranoidted
Priority: --- Keywords: easy, patch
Version: Latest   
Hardware: Any   
OS: Any   

Description Eugene Grosbein freebsd_committer freebsd_triage 2020-03-20 19:36:27 UTC
FreeBSD Handbook's chapter "Electronic Mail" has section "SMTP Authentication" that dates back the times FreeBSD had not any OpenSSL version in base system. Now since we have different OpenSSL versions in different supported branches (1.0.2 for stable/11 and 1.1.1+ for stable/12) that differ in API and ABI, this section needs small correction because it's broken for stable/11 for the moment.

It's paragraph 4 suggests:

Next, edit /etc/make.conf and add the following lines:

SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2

The line "SENDMAIL_LDFLAGS=-L/usr/local/lib" should be replaced with another one:

SENDMAIL_LDADD=/usr/local/lib/libsasl2.so

That's because the only port's library our stock sendmail needs is really libsasl2.so. With -L/usr/local/lib buildworld process links sendmail with ports version of libcrypto what is wrong for stable/11 which needs base system version of libcrypto. The problem's solved with noted one-line change.

I'd like to see this change performed before 11.4-RELEASE coming soon.
Comment 1 Eugene Grosbein freebsd_committer freebsd_triage 2020-03-20 20:07:58 UTC
Small correction: both current "SENDMAIL_LDFLAGS=-L/usr/local/lib" and "SENDMAIL_LDADD=-lsasl2" should be replaced with single line:

SENDMAIL_LDADD=/usr/local/lib/libsasl2.so
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-05-09 10:35:11 UTC
A commit references this bug:

Author: bcr
Date: Sat May  9 10:34:28 UTC 2020
New revision: 54123
URL: https://svnweb.freebsd.org/changeset/doc/54123

Log:
  Update the /etc/make.conf entries regarding
  sendmail. The instructions in the handbook
  were from a time when we did not have any
  OpenSSL version in the base system. Nowadays,
  with different versions of OpenSSL in various
  FreeBSD branches that differ in API/ABI, these
  small corrections are needed because they would
  be broken for stable/11 otherwise.

  Thanks to Eugen Grosbein for pointing this out
  and providing the lines for /etc/make.conf.

  PR:		244937
  Submitted by:	eugen@

Changes:
  head/en_US.ISO8859-1/books/handbook/mail/chapter.xml
Comment 3 Benedict Reuschling freebsd_committer freebsd_triage 2020-05-09 10:36:22 UTC
I committed a change in time before 11.4-RELEASE. Thank you, Eugene.
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2020-08-01 09:38:25 UTC
*** Bug 243357 has been marked as a duplicate of this bug. ***
Comment 5 Eugene Grosbein freebsd_committer freebsd_triage 2020-08-01 09:51:31 UTC
*** Bug 175052 has been marked as a duplicate of this bug. ***
Comment 6 jwdevel 2021-08-05 23:18:00 UTC
FYI: I just hit this bug, and the online handbook does not have the corrected information:  https://docs.freebsd.org/doc/11.4-RELEASE/usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/SMTP-Auth.html

But indeed, applying the change described does fix the issue for me too (: