Re: Help needed getting mail working.
On Wed, 2001-10-24 at 00:48, Jussi Ekholm wrote:
> Kurt Lieber <firstname.lastname@example.org> wrote:
> > By default (at least on Woody) exim puts mail in /var/mail/<username>
> > (note the absence of /spool/)
> I'm running testing, and I have both - /var/mail/$USER and
> /var/spool/mail/$USER. Why is this? The file sizes are equal, so
> they appear to be identical twins. Any ideas why there's two places
> for mail? This, of course, isn't really a problem - I'm just curious
> why the mail spool is located in two places.
One is a symbolic link:
ls -l /var/spool/mail
lrwxrwxrwx 1 root root 7 Jun 16 03:30 /var/spool/mail -> ../mail
If you change directory to /var/spool/mail you will be transparently
mapped into ../mail (/var/mail).
The only space used up is the space to store the link. There is only one
copy of the files.
It is probably done for compatibility. Some programs may access
/var/mail. Some may access /var/spool/mail. Everything works.
Symbolic links are incredibly useful. If you saw my post about having a
data and OS partition here's how you could achieve it:
If your OS is mounted at /
If your data partition is mounted at /mnt/data_partition
Then you could store all home files on the data partition by doing this
as root (backup advice applies first):
mv /home /mnt/data_partition
ln -s /mnt/data_partition/home /home
Then any program accessing the /home directory will automatically access
them on the separate partition.