How to forward old root mails to an external email address?
Andy Wodfer
wodfer at gmail.com
Sat Feb 19 21:40:00 UTC 2011
On Sat, Feb 19, 2011 at 10:24 PM, Daniel Staal <DStaal at usa.net> wrote:
> --As of February 19, 2011 9:33:26 PM +0100, Andy Wodfer is alleged to have
> said:
>
> 'm running FreeBSD 8.0 Release on this particular server and I have a
>> rather large root mailbox under /var/mail/root.
>>
>> I have set up an alias under /etc/aliases for new emails, but I need to
>> forward all the old emails in this mailbox to an external email address.
>>
>> How can I do that?
>>
>
> --As for the rest, it is mine.
>
> Easiest way I know of is to set up a procmail rule to forward everything to
> the external address, then feed the old mailbox to procmail via formail.
>
> ===== .procmailrc:
> :0
> ! new at example.com
>
> ==== Command line:
> cat /var/mail/root | formail -s procmail
>
Hi Daniel and thanks for your reply!
I already tried something similare, but I keep getting command not found for
formail. I was hoping there was a way of doing this without installing
additional software - just use what comes with a default FreeBSD
installation.
Cheers,
Andreas
More information about the freebsd-questions
mailing list