ports/155530: Mailman+Postfix outputs incorrect recommendation

Thomas A. Limoncelli tal at whatexit.org
Sun Mar 13 14:30:12 UTC 2011


>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 at 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:



More information about the freebsd-ports-bugs mailing list