Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 57189

Summary: /usr/local/mailman/mail/mailman script fails to realise it's executed sgid mailman.
Product: Gentoo Linux Reporter: Jaco Kroon <jaco>
Component: [OLD] ServerAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: gentoobugs
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jaco Kroon 2004-07-15 08:37:41 UTC
When executing the program from within a .qmail file using:

|preline /usr/local/mailman/mail/mailman request listname

I get this in the qmail logs:

@4000000040f6a28e1c519494 delivery 8: deferral: 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_"nofiles".__Try_tweaking_the_mail_server_to_run_the/script_as_group_"mailman",_or_re-run_configure,_/providing_the_command_line_option_`--with-mail-gid=nofiles'./

On line 121 of src/common.c:
        GID_T mygid = getgid();

I suspect that this should be getegid which will pick up the gid of mailman instead of that of the calling process.

The comment however says:

/* Is the parent process allowed to call us?
 */

Which doesn't make sense, as this would imply that the primary group of the calling process must also be mailman, thus only the mailman user is allowed to call the wrapper?  Something is fishy, or I'm missing something.

Reproducible: Always
Steps to Reproduce:
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-07-15 13:48:15 UTC
jeez, it shouldn't be in /usr/local at all -- that's a glaring error to begin with.
Comment 2 Jaco Kroon 2004-07-15 23:38:56 UTC
That is what I thought as well.  But I can't see any asy way of fixing this, other than say moving the whole mailman tree to, say /opt/mailman.

Back to the problem of it being run with gid=nofiles and egid=mailman.  How do we solve that?
Comment 3 Jaco Kroon 2004-07-16 16:25:11 UTC
Managed to fix this the "correct" way.  By getting qmail to deliver to mailman using aliases.  I'll write up a howto on this and publish the URI tomorrow afternoon.
Comment 4 Jaco Kroon 2004-07-18 11:05:04 UTC
http://www.kroon.co.za/howto.php?howto=qmail_mailman should shed some light :).
Comment 5 Tuan Van (RETIRED) gentoo-dev 2004-08-19 22:40:47 UTC
*** Bug 60842 has been marked as a duplicate of this bug. ***