DETAILS
Imagine my suprise when I saw that /var/mail was mode 777. As such, any
user may create a file called /var/mail/<username> with a mode readable by
him and trap all incoming mail. Afraid of getting caught? chown the file
to <username> (see my advisory on this subject), leaving it still
world-readable, and no one will ever know who did it.
All of this assumes, of course, that the user has not recieved any mail
yet. If you keep track of your /etc/passwd file, you can monitor for new
entries and create the files as needed.
This permissions problem obviously opens the door for all sorts of
problems with symlinks and such. I would imagine that some mail delivery
programs which aren't as smart as sendmail will follow symlinks in
/var/mail.
And as if all this wasn't bad enough, UnixWare's /usr/bin/mail is a BIG
LIE: