Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 19:29:51 +0100
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        matt <matt@AIC-GW.MLINK.NET>
Cc:        Scott Benjamin <SBenjamin@quest.com>, questions@FreeBSD.ORG
Subject:   Re: Sendmail VS Qmail
Message-ID:  <19990617192951.A16567@rainbow5.scientia.demon.co.uk>
In-Reply-To: <Pine.BSF.4.10.9906170829570.1180-100000@aic-gw.mlink.net>
References:  <19990617151526.C3177@africaonline.co.ke> <Pine.BSF.4.10.9906170829570.1180-100000@aic-gw.mlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990617192951.A16567>