3 # Redeliver any messages that may have accidentally been sent to
4 # /var/mail/$USER, due to temporary AFS glitches.
6 # This should be called as root on deleuze.
8 for MBOX
in /var
/mail
/*; do
10 USER
=$
(basename $MBOX)
11 TMPMBOX
=/tmp
/exim
4/$USER.mbox.tmp
13 # Sanity check: file exists and has nonzero size
14 if ! test -s $MBOX; then
18 # Deliver mail. If the message still can't be written to
19 # $USER/Maildir, Exim will place it in /var/mail/$USER again.
20 mv /var
/mail
/$USER $TMPMBOX
21 formail
-s /etc
/exim
4/deliver-once
$USER < $TMPMBOX