From root@nl.nisser.com  Tue Jan 30 13:00:50 2001
Return-Path: <root@nl.nisser.com>
Received: from nl.nisser.com (unknown [212.104.206.221])
	by hub.freebsd.org (Postfix) with ESMTP id 26CC837B69F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Jan 2001 13:00:50 -0800 (PST)
Received: by nl.nisser.com (Postfix, from userid 0)
	id D992212C31; Tue, 30 Jan 2001 22:01:09 +0100 (CET)
Message-Id: <20010130210109.D992212C31@nl.nisser.com>
Date: Tue, 30 Jan 2001 22:01:09 +0100 (CET)
From: root@nl.nisser.com
Reply-To: roelof@eboa.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: adduser sequences wrongly for Maildirs
X-Send-Pr-Version: 3.2

>Number:         24742
>Category:       bin
>Synopsis:       send adduser.message before dirs are created
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 30 13:10:01 PST 2001
>Closed-Date:    Sat Feb 22 15:43:36 PST 2003
>Last-Modified:  Sat Feb 22 15:43:36 PST 2003
>Originator:     da &
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
eBOA, Nisser division
>Environment:

irrelevant

>Description:

when using adduser in a setting where Maildirs are used the complementary
adduser.message can not be delivered since it gets send before the
actual userdirs have been created and filled from skeleton. Hence
postfix, in my case, will complain.

>How-To-Repeat:

adding an user when running with, say, postfix though I'm sure
qmail will have the same problem.

>Fix:

haven't looked at it. Work around is to not send the message.

>Release-Note:
>Audit-Trail:

From: Alex Kapranoff <kapr@acm.org>
To: roelof@eboa.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/24742: adduser sequences wrongly for Maildirs
Date: Wed, 31 Jan 2001 09:21:17 +0300

 On Tue, Jan 30, 2001 at 10:01:09PM +0100, root@nl.nisser.com wrote:
 > 
 > >Number:         24742
 > >Category:       bin
 > >Synopsis:       send adduser.message before dirs are created
 
 > >Description:
 > 
 > when using adduser in a setting where Maildirs are used the complementary
 > adduser.message can not be delivered since it gets send before the
 > actual userdirs have been created and filled from skeleton. Hence
 > postfix, in my case, will complain.
 
 Applying this patch in /usr/src/usr.sbin/adduser/ should fix it for
 some values of 'fix':
 
 --- /usr/src/usr.sbin/adduser/adduser.perl	Thu Dec 14 22:12:25 2000
 +++ adduser.perl	Wed Jan 31 09:14:00 2001
 @@ -711,9 +711,9 @@
  	    &new_users_pwdmkdb("$new_entry");
  	    &new_users_group_update;
  	    &new_users_passwd_update;  print "Added user ``$name''\n";
 -	    &new_users_sendmessage;
  	    &adduser_log("$name:*:$u_id:$g_id($group_login):$fullname");
  	    &home_create($userhome, $name, $group_login);
 +	    &new_users_sendmessage;
  	} else {
  	    $new_users_ok = 0;
  	}
 
 -- 
 Alex Kapranoff,                              Voice: +7(0832)791845
 We've lived 30 days in the brand new millenium...
 

From: Roelof Osinga <roelof@nisser.com>
To: Alex Kapranoff <kapr@acm.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/24742: adduser sequences wrongly for Maildirs
Date: Wed, 31 Jan 2001 20:40:33 +0100

 Alex Kapranoff wrote:
 > 
 > -           &new_users_sendmessage;
 >             &adduser_log("$name:*:$u_id:$g_id($group_login):$fullname");
 >             &home_create($userhome, $name, $group_login);
 > +           &new_users_sendmessage;
 
 Alas:
 
 Jan 31 20:33:47 nl postfix/local[7151]: 0FDBA12C31:
 to=<vmail@nl.nisser.com>, relay=local, delay=1, status=bounced (maildir
 delivery failed: create
 /home/vmail/Maildir/tmp/980969627.7151_0.nl.nisser.com: Permission
 denied)
 
 That is after application:
 
 nl:/usr/src/usr.sbin/adduser# diff adduser.perl.org adduser.perl
 714d713
 <           &new_users_sendmessage;
 716a716
 >             &new_users_sendmessage;
 
 
 
 -- 
 Home is where the (@) http://eboa.com/ is.
 Nisser home -- http://nl.nisser.com/
 

From: Alex Kapranoff <kapr@acm.org>
To: Roelof Osinga <roelof@nisser.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/24742: adduser sequences wrongly for Maildirs
Date: Mon, 12 Feb 2001 17:45:21 +0300

 On Fri, Feb 02, 2001 at 02:27:27PM +0100, Roelof Osinga wrote:
 > Alex Kapranoff wrote:
 > > 
 > > ...
 > > Roelof,
 > > you probably applied the patch to the sources and didn't remake and
 > > reinstall them. I'm sorry to lead you into confusion. Try this:
 > > ...
 > >   Yeah, you patched the sources. Now install'em!
 > 
 > You betcha I did. If I can do anything wrong, I'll do it! Besides
 > smooth sailing quickly becomes boring <g>.
 > 
 > I'll patch /usr/sbin/adduser before the next users and will let
 > you know. Mind you, this does explain why the patch didn't work.
 > And the 'funny' extension, too! ;).
 
 That's fine. And next time please keep
 FreeBSD-gnats-submit@freebsd.org on Cc: list so that you feedback
 stay in PR database forever.
 
 > Maybe I ought to have my head examined. Nah, he'll just say that
 > would be crazy <g>.
 > 
 > Roelof
 
 -- 
 Alex Kapranoff,                              Voice: +7(0832)791845
 We've lived 6 weeks in the brand new millenium...
 
State-Changed-From-To: open->closed 
State-Changed-By: mtm 
State-Changed-When: Sat Feb 22 15:42:05 PST 2003 
State-Changed-Why:  
The new adduser(8) sends the mail message _after_ creating 
the user, so this is no longer an issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24742 
>Unformatted:
