procmail
[Top] [All Lists]

Re: Forwarding question

2000-12-05 16:59:13
On Tue, 5 Dec 2000, Theresa Peter wrote:
Is it possible or has someone already written a program that will take 
someone's mailbox and forward all mail to another account and then remove 
those messages off of the system?


Sure. It's called formail (and sendmail):

# Let's get the mailbox
lockfile /var/mail/emil.lock
cp /var/mail/emil /some/dir/emil
rm /var/mail/emil
rm -f /var/mail/emil.lock

# And lets send the mailbox
formail -s /usr/lib/sendmail -oi user(_at_)example(_dot_)com < /some/dir/emil



Or something like that...

Untested though... :-)

-- 
...eighty years later he could still recall with the young pang of his
original joy his falling in love with Ada.
                -- Nabokov

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>