[Gllug] Happy 2002, and silly question.
Simon Stewart
sms at lateral.net
Mon Jan 7 11:53:54 UTC 2002
On Sat, Jan 05, 2002 at 05:23:53PM +0000, Formi wrote:
>
> What happen is that the mail ended up in /var/mail/formi,
> usually it is not delivered locally because I have a .forward file
> in /home/formi pointing to the other machine.
>
> So it is still sitting in there, mails that have arrived after I
> started postfix have arrived to the laptop.
>
> So, can somebody teach me how to get that mail sent to the other machine?
>From the procmail manpage:
Procmail can also be invoked to postprocess an already filled system
mailbox. This can be useful if you don't want to or can't use a
$HOME/.forward file (in which case the following script could
periodically be called from within cron(1), or whenever you start
reading mail):
#!/bin/sh
ORGMAIL=/var/mail/$LOGNAME
if cd $HOME &&
test -s $ORGMAIL &&
lockfile -r0 -l1024 .newmail.lock 2>/dev/null
then
trap "rm -f .newmail.lock" 1 2 3 13 15
umask 077
lockfile -l1024 -ml
cat $ORGMAIL >>.newmail &&
cat /dev/null >$ORGMAIL
lockfile -mu
formail -s procmail <.newmail &&
rm -f .newmail
rm -f .newmail.lock
fi
exit 0
Dunno if you're filtering your mail using procmail, but that might
work for you., esp if you have a rule to call your .forward :)
Happy New Year, BTW! :)
Cheers,
Simon
--
I bet the human brain is a kludge. -- Minsky
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list