Date: Sun, 13 Mar 2011 14:23:54 GMT From: "Thomas A. Limoncelli" <tal@whatexit.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/155530: Mailman+Postfix outputs incorrect recommendation Message-ID: <201103131423.p2DENsIa073718@red.freebsd.org> Resent-Message-ID: <201103131430.p2DEUCPf022335@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103131423.p2DENsIa073718>