Thanks for the answers. I realize that I could have fixed up that by
myself without bothering anybody...
But here's now the complementary question... (THAT one I have no
idea of the right (secure) answer)
Assume I have implemented those recipes. So now I'm going back to
work, and my system mailbox contains those mails that had not being
processed because they came outside business hours and I has not been read
from home.
I would like those mails to be processed again by procmail to be
put in the adequate folders...
I scanned procmail's manpage for an answer and found this nice
little script that should do exactly what I need :
#!/bin/sh
ORGMAIL=/usr/spool/mail/$LOGNAME
if cd $HOME &&
test -s $ORGMAIL &&
lockfile -r0 -l3600 .newmail.lock 2>/dev/null
then
trap "rm -f .newmail.lock" 1 2 3 15
umask 077
lockfile -l3600 -ml
cat $ORGMAIL >>.newmail &&
cat /dev/null >$ORGMAIL
lockfile -mu
formail -s procmail <.newmail &&
rm -f .newmail
rm -f .newmail.lock
fi
exit 0
But the problem is : lockfile -ml try to lock my system mailbox with
/usr/spool/mail/gilles.lock and there is NO such directory on my system (my
system mailbox is under /var/mail).
So what can I do ? (apart from asking sweetly to my system
administrator to put system mailboxes in /usr/spool/mail)
Is a "normal lock" the right workaround ? (I do not know whether the
locking should be different for mailboxes)
Once more, thanks in advance for any help, and please, send me a
copy because I'm not on the list.
Gilles
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dieu a dit : il faut partager. Les riches auront la nourriture,
les pauvres de l'appétit. -- COLUCHE