From owner-freebsd-questions@FreeBSD.ORG Mon Mar 12 13:26:30 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E37106564A; Mon, 12 Mar 2012 13:26:30 +0000 (UTC) (envelope-from kamolpat@dmaccess.net) Received: from irpwifi3.truemail.co.th (irpwifi3.truemail.co.th [203.144.173.147]) by mx1.freebsd.org (Postfix) with ESMTP id D5F488FC12; Mon, 12 Mar 2012 13:26:29 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAIj4XU86CIIh/2dsb2JhbAAMNbhoAQEBAwEnEUABBQsLCQ8JFg8JAwIBAgFFBg0BBwEBiAEQtmuKNYZMBIhShSaXd4JvgVA X-IronPort-AV: E=Sophos;i="4.73,571,1325437200"; d="scan'208";a="486121746" Received: from ppp-58-8-130-33.revip2.asianet.co.th (HELO [192.168.1.2]) ([58.8.130.33]) by irp3.truemail.co.th with ESMTP; 12 Mar 2012 20:26:19 +0700 Message-ID: <4F5DF97B.7070306@dmaccess.net> Date: Mon, 12 Mar 2012 20:26:19 +0700 From: kamolpat User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Matthew Seaman References: <4F58D68D.2060700@dmaccess.net> <4F58ED8A.7050602@FreeBSD.org> In-Reply-To: <4F58ED8A.7050602@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PCToolsMIME: Updated by PC Tools Mime Parser 1.0.0.4 Cc: freebsd-questions@FreeBSD.org Subject: Re: question about SMTP-authentication (2nd ) 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: Mon, 12 Mar 2012 13:26:30 -0000 Dear Matthew, According to your recommendation .... (as following). When I do make at /usr/src/sur.sbin/sendmail it show as following. ns1:kamolpat:/usr/src/usr.sbin/sendmail>make clean rm -f sm_os.h sendmail alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o main.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o savemail.o sasl.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o mailq.1.gz newaliases.1.gz aliases.5.gz sendmail.8.gz mailq.1.cat.gz newaliases.1.cat.gz aliases.5.cat.gz sendmail.8.cat.gz ns1:kamolpat:/usr/src/usr.sbin/sendmail>make ln -sf /usr/src/usr.sbin/sendmail/../../contrib/sendmail/include/sm/os/sm_os_freebsd.h sm_os.h cc -O2 -pipe -I/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src -I/usr/src/usr.sbin/sendmail/../../contrib/sendmail/include -I. -DNEWDB -DNIS -DTCPWRAPPERS -DMAP_REGEX -DDNSMAP -DNETINET6 -DSTARTTLS -D_FFR_TLS_1 -I/usr/local/include/sasl -DSASL=2 -std=gnu99 -fstack-protector -c /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/alias.c In file included from /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/alias.c:14: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:135:25: error: sasl/sasl.h: No such file or directory /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:136:29: error: sasl/saslutil.h: No such file or directory In file included from /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/alias.c:14: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:607: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:691: error: expected specifier-qualifier-list before 'sasl_conn_t' *** Error code 1 Stop in /usr/src/usr.sbin/sendmail. ======================================== then I try to find where is sasl.h ns1:kamolpat:/usr>find . -name "sasl.h" ./local/include/sasl/sasl.h ./ports/security/cyrus-sasl2/work/cyrus-sasl-2.1.25/include/sasl.h ./ports/security/cyrus-sasl2-saslauthd/work/cyrus-sasl-2.1.25/include/sasl.h What should I do next? Shold I just copy the sasl.h to /usr/src/contrib/sendmail/src/sendmail ? Thanks Kamolpat On 3/9/2012 12:34 AM, Matthew Seaman wrote: > On 08/03/2012 15:55, kamolpat wrote: >> Setup Reference >> ============== >> 1. I read the how to setup from FreeBSD Handbook (online)-> Chapter 29 >> Electronic Mail -> 29.10 SMTP Authentication from freebsd.org >> 2. setup for cyrus-sasl2 was fine (setup via >> usr/ports/security/cyrus-sasl2) >> 3. setup for openssl was 90% fine (setup via port) reference to FreeBSD >> Handbook (online)->Chapter 15 Security -> 15.8 OpenSSL >> accept the "STARTTLS" line doesn't appear as mention on the last >> part of article. >> > Did you rebuild sendmail with the right flags so that it would enable > all the SASL bits? Apart from that you seem to have done all the right > stuff that I can see. > > You need to add this to /etc/make.conf: > > SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2 > SENDMAIL_LDFLAGS=-L/usr/local/lib > SENDMAIL_LDADD=-lsasl2 > > and then rebuild sendmail -- assuming you have system sources installed: > > # cd /usr/src/usr.sbin/sendmail > # make clean > # make > # make install > > If you haven't got the system sources installed, then you can get them > easily enough with csup(1) or freebsd-update(8) or several other ways. > Or you could just install sendmail from ports -- obviously, make sure to > choose the option to enable SASL in the config dialogue. If you use the > ports sendmail, so long as you set up mailer.conf(5) to point to the > ports version -- like so: > > lucid-nonsense:/etc/mail:% cat mailer.conf > # $FreeBSD: stable/8/etc/mail/mailer.conf 93858 2002-04-05 04:25:14Z > gshapiro $ > # > # Execute the "real" sendmail program, named /usr/local/sbin/sendmail > # > sendmail /usr/local/sbin/sendmail > send-mail /usr/local/sbin/sendmail > mailq /usr/local/sbin/sendmail > newaliases /usr/local/sbin/sendmail > hoststat /usr/local/sbin/sendmail > purgestat /usr/local/sbin/sendmail > > and put the following in /etc/make.conf so it uses the latest > configuration file bits: > > SENDMAIL_CF_DIR= /usr/local/share/sendmail/cf > MAKEMAP= /usr/local/sbin/makemap > > then the ports sendmail is pretty much a drop-in replacement for the > system one, and you can use all the config bits in /etc/mail in exactly > the same way as normal. > > Cheers, > > Matthew > E-mail message checked by Internet Security (7.0.0.508) Database version: 6.19440 http://www.pctools.com/en/internet-security/