Mailing List Archive

No Home Directory Type of system
Hi,

I hope this isn't in a FAQ of some sort. Forgive me if it is. I have a
current sendmail serverthat assigns all users the home directory of
/home/dialup... so as far as i can ponder(using qmail on my home system)
i can't find the right man page or doc to figure out how to use qmail on a
'homeless' system. And converting our /var/spool/mail directory into a
/home/ durectory would be chaotic, i think. Dunno, if qmail can do it so
I thought i would check. According the Dan B.'s blurb it looks like it
can do this. I thought maybe someone would have asimiliar situation.
Thanks again for your time. Also please email hartman@kuntrynet.com with
a Carbon Copy of your reply if you would :>

Peter


*-=-=-=-=-=-=-=* w0nderful *-=-* w0rld *-=-* 0f *-=-* wart *-=-=-=-=-*
hartman@kuntrynet.com
wart@trilidun.kuntrynet.com
http://trilidun.kuntrynet.com
Eudaemonia Mud: mud.kuntrynet.com Port 4000
Re: No Home Directory Type of system [ In reply to ]
[ pjh <wart@trilidun.kuntrynet.com> 1997-3 -4 19:01 -0500 ]
|---
| Hi,
|
| I hope this isn't in a FAQ of some sort. Forgive me if it is. I
| have a current sendmail serverthat assigns all users the home
| directory of /home/dialup... so as far as i can ponder(using qmail
| on my home system) i can't find the right man page or doc to figure
| out how to use qmail on a 'homeless' system. And converting our
| /var/spool/mail directory into a /home/ durectory would be chaotic,
| i think.

Nevertheless, that is the sort of thing you must do. It would
probably make your transition difficult if you use /var/spool/mail for
the purpose, but surely for qmail to work, qmail must believe that
users do have a home. You might create a mailhomes directory, say
/var/mailhomes, give each user a directory /var/mailhomes/user, and
put a line in users/assign for each user.

More precisely: For every user make sure you do something like

mkdir /var/mailhomes/$USER
chown $USER /var/mailhomes/$USER
chmod 700 /var/mailhomes/$USER
echo "=$USER:$USER:$UID:$GID:/var/mailhomes/$USER:::" \
>> /var/qmail/users/assign
echo "+$USER-:$USER:$UID:$GID:/var/mailhomes/$USER:-::" \
>> /var/qmail/users/assign

and then run

/var/qmail/bin/qmail-newu

You're probably best off with a perl program to generate the home
directories and users/assign using data from the password file.

- Harald
Re: No Home Directory Type of system [ In reply to ]
On Wed, 5 Mar 1997, Harald Hanche-Olsen wrote:

> | out how to use qmail on a 'homeless' system. And converting our
> | /var/spool/mail directory into a /home/ durectory would be chaotic,
> | i think.
>
> Nevertheless, that is the sort of thing you must do. It would

Actually, what I did was simple. I used to so I wouldn't have to
recompile every program using /var/spool/mail at once... Using bash I did:

cd /var/spool/mail
for n in *; do mv $n /home/$n/Mailbox; done
cd /home
for n in *; do touch $n/Mailbox; chown $n.users $n/Mailbox;done

Then I took the latest adduser for shadow (adduser+shadow+webdir
1.5, to be exact) and did some minor changes to it to make it create
~/Mailbox instead, and symlink it, then run qmail-pw2u and qmail-newu.
Thus all my users have symlinks to /var/spool/mail, yet the permissions on
the Mailbox files themselves prevent other users from snooping.

-Dustin Marquess
Re: No Home Directory Type of system [ In reply to ]
Dustin Marquess <jailbird@alcatraz.fdf.net> writes:
>
>Thus all my users have symlinks to /var/spool/mail, yet the permissions on
>the Mailbox files themselves prevent other users from snooping.
>

Careful. Those symlinks in /var/spool/mail aren't as complete a
solution as they might appear at first.

If your mail programs are in the habit of deleting empty mailbox
files, and they think the mailbox file is /var/spool/mail/$LOGIN,
then the symlink will be deleted rather than the mailbox file.

The next time they try to read mail with that same mail program,
it'll tell them there isn't anything in /var/spool/mail/$LOGIN.

-Greg
--
Greg Andrews West Coast Online
Unix System Administrator 5800 Redwood Drive
gerg@wco.com Rohnert Park CA 94928
(yes, 'greg' backwards) 1-800-WCO-INTERNET
Re: No Home Directory Type of system [ In reply to ]
On Wed, 5 Mar 1997, Dustin Marquess wrote:

> Actually, what I did was simple. I used to so I wouldn't have to
> recompile every program using /var/spool/mail at once... Using bash I did:
>
> cd /var/spool/mail
> for n in *; do mv $n /home/$n/Mailbox; done
> cd /home
> for n in *; do touch $n/Mailbox; chown $n.users $n/Mailbox;done

Damn... I forgot to include the linking in there :)... that last
line should be:

for n in *; do touch $n/Mailbox; chown $n.users $n/Mailbox; \
ln -sf $n/Mailbox /var/spool/mail/$n; done

-Dustin Marquess
Re: No Home Directory Type of system [ In reply to ]
On Wed, 5 Mar 1997, Greg Andrews wrote:

> Dustin Marquess <jailbird@alcatraz.fdf.net> writes:
> >
> >Thus all my users have symlinks to /var/spool/mail, yet the permissions on
> >the Mailbox files themselves prevent other users from snooping.
> >
>
> Careful. Those symlinks in /var/spool/mail aren't as complete a
> solution as they might appear at first.
>
> If your mail programs are in the habit of deleting empty mailbox
> files, and they think the mailbox file is /var/spool/mail/$LOGIN,
> then the symlink will be deleted rather than the mailbox file.
>
> The next time they try to read mail with that same mail program,
> it'll tell them there isn't anything in /var/spool/mail/$LOGIN.

Ya, that could be a problem. Actually, I've never had this
problem. I do have shadow's login.defs set the MAIL variable to
~/Mailbox, and pine's config file, etc... so all the MUA's on the system
use ~/Mailbox, so the only thing the symlink was needed for was qpopper
and finger, which both have been updated.

-Dustin Marquess
Re: No Home Directory Type of system [ In reply to ]
At 14:49 05/03/97 -0800, Greg Andrews wrote:
>Careful. Those symlinks in /var/spool/mail aren't as complete a
>solution as they might appear at first.
>
>If your mail programs are in the habit of deleting empty mailbox
>files, and they think the mailbox file is /var/spool/mail/$LOGIN,
>then the symlink will be deleted rather than the mailbox file.

chmod 755 /var/spool/mail should do the trick ;)

Andi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andi Gutmans - Computer Science, Technion

Email: andi@vipe.technion.ac.il
Web: http://andi.rifkin.technion.ac.il

PGP public key: finger andi@vipe.technion.ac.il
Re: No Home Directory Type of system [ In reply to ]
At 01:24 06/03/97 +0200, Andi Gutmans wrote:
>chmod 755 /var/spool/mail should do the trick ;)

Well than on second thought it might not. Depending on the mailer. But I
think you can tell almost all UNIX mailer's to look at ~/Mailbox. And
qpopper only needs like a 4 line patch to work with it.

Andi
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andi Gutmans - Computer Science, Technion

Email: andi@vipe.technion.ac.il
Web: http://andi.rifkin.technion.ac.il

PGP public key: finger andi@vipe.technion.ac.il
Re: No Home Directory Type of system [ In reply to ]