ports/142000: Wrong MAIL_GID when configuring mailman for postfix MTA

Adriaan ratten.adriaan at gmail.com
Fri Dec 25 08:10:01 UTC 2009


>Number:         142000
>Category:       ports
>Synopsis:       Wrong MAIL_GID when configuring mailman for postfix MTA
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 25 08:10:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Adriaan
>Release:        FreeBSD 7.2-Release
>Organization:
>Environment:
FreeBSD vintrax.utp.xnet 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct  2 12:21:39 UTC 2009     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When installing mailman 2.1.12 from ports for the Postfix MTA, a wrong MAIL_GID is selected.
According to the "FreeBSD-post-install-notes"  file the MAIL_GID needs to be 'nobody':

--begin quote
3.3) Postfix

     The value of MAIL_GID has to be set to 'nobody' (or 65534) when building
     the Mailman port, so you have to choose POSTFIX on build options to
     set it to you.
--end quote

In contradiction to this statement the Makefile wrongly sets the MAIL_GID to 'mailman':

==quote start
.if defined(WITH_POSTFIX)
.if defined(WITH_SENDMAIL) || defined(WITH_EXIM3) || defined(WITH_EXIM4) || \
defined(WITH_COURIER)
BROKEN= choose only one MTA integration
.endif
MAIL_GID?=      mailman
EXTRA_PATCHES+= ${FILESDIR}/postfix-verp.diff
.endif
==quote end

As result from this mailman returns all incoming mailman requests with the following error message:

<mailman-request at vintrax.utp.xnet>: Command died with status 2:
    "/usr/local/mailman/mail/mailman request mailman". Command output: Group
    mismatch error.  Mailman expected the mail wrapper script to be executed as
    group "mailman", but the system's mail server executed the mail script as
    group "nobody".  Try tweaking the mail server to run the script as group
    "mailman", or re-run configure,  providing the command line option
    `--with-mail-gid=nobody'.

This error is logged by postfix in "/var/log/maillog" as:

Dec 24 23:16:03 vintrax Mailman mail-wrapper: Group mismatch error.  Mailman expected the mail wrapper script to be executed as group "mailman", but the system's mail server executed the mail script as group "nobody".  Try tweaking the mail server to run the script as group "mailman", or re-run configure,  providing the command line option `--with-mail-gid=nobody'.



>How-To-Repeat:
Install the mailman port for postfix by using "make config" and select the " POSTFIX   for use with postfix" option in the dialogue box.

>Fix:
Change the Makefile "MAIL_GID?=nobody" into "MAIL_GID?=nobody":

The fixed version:

.if defined(WITH_POSTFIX)
.if defined(WITH_SENDMAIL) || defined(WITH_EXIM3) || defined(WITH_EXIM4) || \
defined(WITH_COURIER)
BROKEN= choose only one MTA integration
.endif
MAIL_GID?=      nobody
EXTRA_PATCHES+= ${FILESDIR}/postfix-verp.diff
.endif

Instead of editing the Makefile, a workaround is 

for the (ba)sh shell:  export MAIL_GID=nobody
for the csh shell   :  setenv MAIL_GID nobody

before running 'make'

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list