From owner-freebsd-questions@FreeBSD.ORG Wed Nov 22 16:45:20 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18EF416A86A for ; Wed, 22 Nov 2006 16:45:20 +0000 (UTC) (envelope-from dave.list@pixelhammer.com) Received: from ecluster5.tls.net (ecluster5.tls.net [65.196.224.135]) by mx1.FreeBSD.org (Postfix) with SMTP id 4B807441DD for ; Wed, 22 Nov 2006 16:37:58 +0000 (GMT) (envelope-from dave.list@pixelhammer.com) Received: (qmail 17016 invoked by uid 89); 22 Nov 2006 16:32:59 -0000 Received: from 208-70-40-179.bb.hrtc.net (HELO ?192.168.0.103?) (ldg%tls.net@208.70.40.179) by auth-ecluster5.tls.net with SMTP; 22 Nov 2006 16:32:59 -0000 Message-ID: <45647CF6.1050504@pixelhammer.com> Date: Wed, 22 Nov 2006 11:38:14 -0500 From: DAve User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: FreeBSD Questions References: <226ae0c60611220639j1dae5331qeadfc60130c75aac@mail.gmail.com> In-Reply-To: <226ae0c60611220639j1dae5331qeadfc60130c75aac@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Building Sendmail from ports 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: Wed, 22 Nov 2006 16:45:20 -0000 David Robillard wrote: > [ ---8<--- Text has been removed! ---8<---] > >> But, where will the port install my *.mc and *.cf files? This I can't >> seem to figure out. I would like to know before I hit 'make install' in >> the port dir. I would think it will install them into >> /usr/local/share/sendmail/cf, would that be correct? > > Hi DAve, > > When you use the mail/sendmail port, it does install files in > /usr/local/share/sendmail. Think of it as the base system's sendmail > files in /usr/share/sendmail. As I expected. > > Now, the .mc and .cf files are still kept in /etc/mail and not in > /usr/local/etc/mail as one could think by using a port. Got that from reading the make files, good to confirm. > > Note that you will find two scripts in /usr/local/etc/rc.d when you > install the sendmail port. They are `sendmail.sh.sample' and > `sm-client.sh.sample'. But you don't need to use them. The base > system's /etc/rc.d/sendmail script handles both the base system's > sendmail and the port's sendmail. I use a custom rc script already due to my split config. > > The key for a pain free mail/sendmail ports usage is to do what you > said. That is to edit make.conf(5) and to use special make(1) targets > from the mail/sendmail's Makefile. > > Briefly, here's the way I do things when I update mail/sendmail (YMMV of > course) > > sudo vi /etc/make.conf > > ## > # mail/sendmail port configuration. > ## > > # Do not build and install the base distribution of sendmail. > # > NO_SENDMAIL= TRUE > > # Specify where the configuration directory is located. > # > SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf > > .if ${.CURDIR:M*/mail/sendmail} > SENDMAIL_WITHOUT_IPV6=yes \ > SENDMAIL_WITHOUT_NIS=yes \ > SENDMAIL_WITH_TLS=yes \ > SENDMAIL_WITH_SMTPS=yes \ > SENDMAIL_WITH_LDAP=yes \ > SENDMAIL_WITH_BERKELEYDB_VER=42 \ > SENDMAIL_WITH_SOCKETMAP=yes \ > SENDMAIL_WITH_PICKY_HELO_CHECK=yes \ > SENDMAIL_WITH_SHARED_MILTER=yes > .endif > > sudo porteasy -uv mail/sendmail > sudo porteasy -uv security/openssl > sudo porteasy -uv security/gnutls > > cd /usr/ports/mail/sendmail > > sudo make > # -OR if you don't want to edit make.conf(5), you can run something like > this: > sudo make -DSENDMAIL_WITHOUT_IPV6 -DSENDMAIL_WITHOUT_NIS > -DSENDMAIL_WITH_TLS -DSENDMAIL_WITH_SMTPS \ > -DSENDMAIL_WITH_BERKELEYDB_VER=42 -DSENDMAIL_WITH_SOCKETMAP > -DSENDMAIL_WITH_PICKY_HELO_CHECK -DSENDMAIL_WITH_SHARED_MILTER > > sudo make tls-install > sudo make install > sudo make mailer.conf > sudo make clean > > Now, you might not need the exact same features of Sendmail as I do, > of course. But the `make mailer.conf' is quite important. That's going > to edit /etc/mail/mailer.conf which instructs the OS to use > /usr/local/sbin/sendmail instead of the base system's sendmail. You > don't have to change your PATH either. Saw that in the Makefile. > > Why? Because if take a look at /usr/sbin/sendmail, it's not a binary, > it's a symbolic link to `/usr/sbin/mailwrapper'. Just read the > mailwrapper(8) man page and you'll understand how things work. Yep. > >> I want to make certain that when I build new sendmail.in.cf and >> sendmail.out.cf the correct files are used by m4. Currently I run the >> following when making changes to my *.mc files >> >> /usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ >> /usr/share/sendmail/cf/m4/cf.m4 sendmail.in.mc > sendmail.in.cf > > Take a look at the /etc/mail/Makefile and you'll see that it can > determine your _CF_DIR_. But it takes a wrong decision. It uses either > /usr/share/sendmail/cf or /usr/src/contrib/sendmail/cf. Previously I didn't want to change the installed Makefile in /etc/mail, I likely will now. > > To work around this, you can edit /etc/mail/Makefile or use the > following at the top of your sendmail.mc files: > > dnl include. > dnl Use the following m4 macro file. > dnl > include(`/usr/share/sendmail/cf/m4/cf.m4')dnl Excellent idea! > > That's it. If you need any help, don't hesitate to contact me. > > Have fun :) I appreciate the heads up, thanks! DAve -- Three years now I've asked Google why they don't have a logo change for Memorial Day. Why do they choose to do logos for other non-international holidays, but nothing for Veterans? Maybe they forgot who made that choice possible.