From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 13 14:30:12 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDC301065675 for ; Sun, 13 Mar 2011 14:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 900C88FC14 for ; Sun, 13 Mar 2011 14:30:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2DEUCDl022339 for ; Sun, 13 Mar 2011 14:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2DEUCPf022335; Sun, 13 Mar 2011 14:30:12 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2011 14:30:12 GMT Resent-Message-Id: <201103131430.p2DEUCPf022335@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Thomas A. Limoncelli" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD352106566B for ; Sun, 13 Mar 2011 14:23:54 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 91A628FC0C for ; Sun, 13 Mar 2011 14:23:54 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2DENsKN073733 for ; Sun, 13 Mar 2011 14:23:54 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p2DENsIa073718; Sun, 13 Mar 2011 14:23:54 GMT (envelope-from nobody) Message-Id: <201103131423.p2DENsIa073718@red.freebsd.org> Date: Sun, 13 Mar 2011 14:23:54 GMT From: "Thomas A. Limoncelli" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/155530: Mailman+Postfix outputs incorrect recommendation X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 14:30:12 -0000 >Number: 155530 >Category: ports >Synopsis: Mailman+Postfix outputs incorrect recommendation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 14:30:12 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Thomas A. Limoncelli >Release: 8.1-RELEASE >Organization: >Environment: FreeBSD jughandle.whatexit.org 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I upgraded mailman 2.14 to 2.14_1 today and noticed there is a typo in the recommendations at the end. At the end it printed: Your Postfix hostname is non-default. You must add "$SMTPHOST = jughandle.whatexit.org" to the bottom of mm_cfg.py. That file is Python, not Perl. There should not be a "$" in that statement. >How-To-Repeat: Install Mailman while WITH_POSTFIX is defined. >Fix: *** Makefile 2011/03/13 13:45:51 1.1 --- Makefile 2011/03/13 13:46:21 *************** *** 188,194 **** @if [ "x`${LOCALBASE}/sbin/postconf -h myhostname`" != "xlocalhost" ]; then \ ${ECHO_CMD} ""; \ ${ECHO_CMD} "Your Postfix hostname is non-default."; \ ! ${ECHO_CMD} -n "You must add \"\$$SMTPHOST = "; \ ${ECHO_CMD} -n `${LOCALBASE}/sbin/postconf -h myhostname`; \ ${ECHO_CMD} "\" to the bottom of mm_cfg.py."; \ ${ECHO_CMD} ""; \ --- 188,194 ---- @if [ "x`${LOCALBASE}/sbin/postconf -h myhostname`" != "xlocalhost" ]; then \ ${ECHO_CMD} ""; \ ${ECHO_CMD} "Your Postfix hostname is non-default."; \ ! ${ECHO_CMD} -n "You must add \"SMTPHOST = "; \ ${ECHO_CMD} -n `${LOCALBASE}/sbin/postconf -h myhostname`; \ ${ECHO_CMD} "\" to the bottom of mm_cfg.py."; \ ${ECHO_CMD} ""; \ Or even better.... *** Makefile 2011/03/13 13:45:51 1.1 --- Makefile 2011/03/13 14:22:58 *************** *** 185,197 **** @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .if defined(WITH_POSTFIX) @if [ "x`${LOCALBASE}/sbin/postconf -h myhostname`" != "xlocalhost" ]; then \ ${ECHO_CMD} ""; \ ${ECHO_CMD} "Your Postfix hostname is non-default."; \ ! ${ECHO_CMD} -n "You must add \"\$$SMTPHOST = "; \ ! ${ECHO_CMD} -n `${LOCALBASE}/sbin/postconf -h myhostname`; \ ${ECHO_CMD} "\" to the bottom of mm_cfg.py."; \ ${ECHO_CMD} ""; \ fi .endif --- 185,203 ---- @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .if defined(WITH_POSTFIX) + @echo `echo ${PREFIX} ${MAILMANDIR}` @if [ "x`${LOCALBASE}/sbin/postconf -h myhostname`" != "xlocalhost" ]; then \ ${ECHO_CMD} ""; \ + smtphostneeded=`${LOCALBASE}/sbin/postconf -h myhostname` ; \ + smtphostcurrent=`PYTHONPATH=${MAILMANDIR}/Mailman python -c 'import mm_cfg ; print hasattr(mm_cfg, "SMTPHOST") and mm_cfg.SMTPHOST or ""'` ; \ + if [ "x${smtphostneeded}" != "x${smtphostcurrent}" ]; then \ ${ECHO_CMD} "Your Postfix hostname is non-default."; \ ! ${ECHO_CMD} -n "You must add \"SMTPHOST = "; \ ! ${ECHO_CMD} -n $${smtphostneeded}; \ ${ECHO_CMD} "\" to the bottom of mm_cfg.py."; \ + ${ECHO_CMD} "Current setting: SMTPHOST = '"$${smtphostcurrent}"'"; \ ${ECHO_CMD} ""; \ + fi ; \ fi .endif >Release-Note: >Audit-Trail: >Unformatted: