From owner-freebsd-questions Thu Jun 17 12:31:53 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 9948814FAC for ; Thu, 17 Jun 1999 12:31:12 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from rainbow5.scientia.demon.co.uk ([192.168.1.2] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.02 #1) id 10ugvF-000HM5-00; Thu, 17 Jun 1999 19:29:57 +0100 (envelope-from ben@rainbow5.scientia.demon.co.uk) Received: from rainbow5.scientia.demon.co.uk (ident=ben) by rainbow5.scientia.demon.co.uk with local (Exim 3.02 #1) id 10ugvA-0004Jn-00; Thu, 17 Jun 1999 19:29:52 +0100 (envelope-from ben@rainbow5.scientia.demon.co.uk) Date: Thu, 17 Jun 1999 19:29:51 +0100 From: Ben Smithurst To: matt Cc: Scott Benjamin , questions@FreeBSD.ORG Subject: Re: Sendmail VS Qmail Message-ID: <19990617192951.A16567@rainbow5.scientia.demon.co.uk> References: <19990617151526.C3177@africaonline.co.ke> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG matt wrote: > + system("chmod 700 $home/$name"); Did you have something against: chmod 0700, "$home/$name"; ? > + system("touch $home/$name/Mailbox"); > + system("chown $name:$name $home/$name/Mailbox"); > + system("chmod 600 $home/$name/Mailbox"); > + system("ln -s $home/$name/Mailbox /var/mail/$name"); Likewise, they can easily be done properly from within Perl. open F, ">>$home/$name/Mailbox"; close F; ($uid, $gid) = (getpwnam $name)[2,3]; chown $uid, $gid, "$home/$name/Mailbox"; chmod 0600, "$home/$name/Mailbox"; symlink "$home/$name/Mailbox", "/var/mail/$name"; should do something like what you want, much more efficiently than just doing system("..."). (I'm assuming you're using touch(1) only to create the file, and don't care about updating the atime/mtime of the file.) ObThread: I like exim, http://www.exim.org. Pretty much sendmail compatible, but more supposedly more secure, faster, and in my opinion is easier to configure. Although I have been *very* tempted to switch to Postfix, I have had no problems with exim yet though. -- Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message