It looks like it should, but if i add the line
(truncate (MAILBOX, 0)) or print "ACK!: truncate didn't work : $!\n";
I get : ACK!: truncate didn't work : Permission denied
Permissions on /var/spool/mail are
drwxrwxr-x 2 root mail 1024 Jan 12 22:43 /var/spool/mail/
and permissions on the mailbox file in that directory are 0660, so it looks like truncate is trying to unlink the file and recreate it (or something - it does the same with a non-zero LENGTH).
setantae@eidosnet.co.uk|setantae|www.setantae.uklinux.net | [reply] [d/l] |
| [reply] [d/l] [select] |
| [reply] |