Forwarding existing mail
Gerald Combs
gerald at ethereal.com
Sat Jan 25 23:46:46 CST 2003
On Sat, 25 Jan 2003, Jonathan Hutchins wrote:
> A user on a system I manage doesn't have the ability to pick up their mail,
> which has accumulated for a while. The do have an address I can forward it
> to, and I've set that up for new messages, but how do I forward the mail
> that's already been received without having to go into each message and
> manually re-address it?
According to its man page, the "formail" utility that comes with procmail
should be able to do this, e.g.
formail -s sendmail new at addr.ess < /var/mail/oldmailbox
The "-s" option splits the input into separate messages and feeds them
into the command specified, one at a time. It has to be the last option
used. You may have to use "-ds" depending on the mailbox format.
More information about the Kclug
mailing list