From owner-freebsd-ports@FreeBSD.ORG Thu May 9 16:09:04 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ADD167DB for ; Thu, 9 May 2013 16:09:04 +0000 (UTC) (envelope-from florent@peterschmitt.fr) Received: from peterschmitt.fr (peterschmitt.fr [5.135.177.31]) by mx1.freebsd.org (Postfix) with ESMTP id 77EE6F7B for ; Thu, 9 May 2013 16:09:04 +0000 (UTC) Received: from [192.168.0.23] (4ab54-4-88-163-248-31.fbx.proxad.net [88.163.248.31]) by peterschmitt.fr (Postfix) with ESMTPSA id 4015C7649 for ; Thu, 9 May 2013 18:09:01 +0200 (CEST) Message-ID: <518BCA17.7010601@peterschmitt.fr> Date: Thu, 09 May 2013 18:08:55 +0200 From: Florent Peterschmitt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: FreeBSD Mailing List Subject: mail/postfix - automated install : bypass default mailer message X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2TQGAFIVWQVCRULNWEHEL" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 16:09:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TQGAFIVWQVCRULNWEHEL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, In pkg-install.in it's said if POSTFIX_DEFAULT_MTA=3DYES then postfix wil= l be set as default mailer in /etc/mail/mailer.conf So, I do export POSTFIX_DEFAULT_MTA=3DYES but the only thing it does is setting the default answer to yes. So is it possible to make the installation fully automated, without any ask ? Should we do yes | pkg install postfix ? I think it should be possible to have a non-interactive installation, via an environment variable. This *should* work: --- pkg-install.in 2013-05-09 18:01:41.802404861 +0200 +++ pkg-install.in 2013-05-09 18:06:04.858404947 +0200 @@ -83,7 +83,13 @@ egrep -q "^newaliases.*${PREFIX}/sbin/sendmail" ${MC} ret=3D$? if [ ${ret} -ne 0 ]; then - if yesno "Would you like to activate Postfix in ${MC}" ${DEFAULT_REPLACE_MAILERCONF}; then + local postfix_ret + if [ -z ${POSTFIX_DEFAULT_MTA_FORCE} ]; then + postfix_ret=3D$(yesno "Would you like to activate= Postfix in ${MC}" ${DEFAULT_REPLACE_MAILERCONF}) + else + postfix_ret=3D0 + fi + if ${postfix_ret}; then /bin/mv -f ${MC} ${MC}.old echo "#" > ${MC} echo -n "# Execute the Postfix sendmail program" >> ${MC} --=20 Florent Peterschmitt +33 (0)6 64 33 97 92 florent@peterschmitt.fr ------------------------ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ------enig2TQGAFIVWQVCRULNWEHEL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRi8ocAAoJEMtO2Sol0IImEMIIAIS9jVbacKiZLD1HisZmdP5C aPtAGxI2zhOCjIYrdcir/mELNJmnkKMiACyTZPtWEqUNq0KJrS12AJ5Kj2jbstbF 00dImHgfqk/vgcKMWCDMsMdN0d0Rw4LYe30Me4XfhXymRQ/saP5PAcWOxW64J5a5 kxsEzXoxhK1Fwczr0hG8V+KMPTJZaiM+3O/0SwPbPh2WhMtBwV3fc90jhj/JcQKi PlsSODNiYOP3aaUquy/W6WmpfhWXN7Fk+AyzFeVK4AEG1KpYKkbBe/ZfZmBkM9im RnaDRmrw77OWiHkGv8Van33ScHKTVgF9RQ9hq0t/6qHHVMFTd0mx14mHnyusbO0= =uuNW -----END PGP SIGNATURE----- ------enig2TQGAFIVWQVCRULNWEHEL--