From owner-freebsd-questions@FreeBSD.ORG Sun Apr 30 21:42:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1993016A409 for ; Sun, 30 Apr 2006 21:42:23 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id E95E943D72 for ; Sun, 30 Apr 2006 21:42:09 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k3ULfmi0004927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 May 2006 00:41:52 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k3ULfrVe065715; Mon, 1 May 2006 00:41:53 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k3ULfqsP065714; Mon, 1 May 2006 00:41:52 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 1 May 2006 00:41:52 +0300 From: Giorgos Keramidas To: Duane Whitty Message-ID: <20060430214152.GA65668@gothmog.pc> References: <4451C500.6090304@greenmeadow.ca> <4451C92A.10103@greenmeadow.ca> <4451CD51.5080605@greenmeadow.ca> <20060428163702.GA7220@gothmog.pc> <4454516F.3080904@greenmeadow.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4454516F.3080904@greenmeadow.ca> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.394, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.81, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Sendmail Compile-Time Configuration - Success X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2006 21:42:25 -0000 On 2006-04-30 02:55, Duane Whitty wrote: >Giorgos Keramidas wrote: >> No, you probably want something similar to the way SASL2 support is >> compiled into the base-system version of Sendmail. In my `make.conf' >> I have the following: >> >> SENDMAIL_CFLAGS= -I/usr/local/include -DSASL=2 >> SENDMAIL_LDFLAGS= -L/usr/local/lib >> SENDMAIL_LDADD= -lsasl2 >> >> While adding stuff to these variables please keep in mind that GCC on >> FreeBSD has a major difference from the default GCC behavior: it does *not* >> add /usr/local/include to the default include path or /usr/local/lib to the >> default library search path. So you will have to add them yourself, as >> shown above. > > Hi, > > Thank you Giorgos, this is the right direction. Your example was most > fortuitous, maybe even prescient. ;) Heh! Sheer luck, sheer luck. > LDAP support in Sendmail requires that SASL support also be built in. Great! I didn't know this, but SASL is one of the examples I could easily find in /usr/src to copy/ into the reply :-) > SENDMAIL_CFLAGS= -I/usr/local/include -DSASL=2 -DLDAPMAP > SENDMAIL_LDFLAGS= -L/usr/local/lib > SENDMAIL_LDADD= -lsasl2 -lldap -llber > > sendmail -d0.1 -bt now includes LDAPMAP and USE_LDAP_INIT Cool! Just another useful bit, then, now that you got it all going. Now you have to make sure you remember to rebuild Sendmail whenever these libraries change version number. An easy way to do this is using something like: % gothmog:/home/build/src# cat -n ../rebuild-sendmail.sh % 1 #!/bin/sh % 2 % 3 DIRS="" % 4 DIRS="${DIRS} ./bin/rmail" % 5 DIRS="${DIRS} ./lib/libmilter" % 6 DIRS="${DIRS} ./lib/libsm" % 7 DIRS="${DIRS} ./lib/libsmdb" % 8 DIRS="${DIRS} ./lib/libsmutil" % 9 DIRS="${DIRS} ./libexec/mail.local" % 10 DIRS="${DIRS} ./libexec/smrsh" % 11 DIRS="${DIRS} ./usr.bin/vacation" % 12 DIRS="${DIRS} ./usr.sbin/editmap" % 13 DIRS="${DIRS} ./usr.sbin/mailstats" % 14 DIRS="${DIRS} ./usr.sbin/makemap" % 15 DIRS="${DIRS} ./usr.sbin/praliases" % 16 DIRS="${DIRS} ./usr.sbin/sendmail" % 17 % 18 export MAKEOBJDIRPREFIX=/home/build/obj % 19 % 20 for dname in ${DIRS} ; do % 21 ( cd "${dname}" && make clean && make && make install ) % 22 if test $? -ne 0 ; then % 23 echo "" % 24 echo ">>> FAILED while rebuilding ${dname}" % 25 exit 1 % 26 fi % 27 done % gothmog:/home/build/src# I keep this script just one folder upwards of my usual build tree, and then run it inside `/home/build/src' to rebuild the Sendmail bits. Have fun, - Giorgos