From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 21:24:46 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F79D1065674 for ; Sat, 19 Feb 2011 21:24:46 +0000 (UTC) (envelope-from DStaal@usa.net) Received: from mail.magehandbook.com (173-8-4-45-WashingtonDC.hfc.comcastbusiness.net [173.8.4.45]) by mx1.freebsd.org (Postfix) with ESMTP id E9D648FC1A for ; Sat, 19 Feb 2011 21:24:45 +0000 (UTC) Received: from [192.168.1.50] (Mac-Pro.magehandbook.com [192.168.1.50]) by mail.magehandbook.com (Postfix) with ESMTP id 77FBF2845B; Sat, 19 Feb 2011 16:24:44 -0500 (EST) Date: Sat, 19 Feb 2011 16:24:43 -0500 From: Daniel Staal To: Andy Wodfer , freebsd-questions Message-ID: <1837CB358903EB8C60F348FA@mac-pro.magehandbook.com> In-Reply-To: References: X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: How to forward old root mails to an external email address? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 21:24:46 -0000 --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@example.com ==== Command line: cat /var/mail/root | formail -s procmail Daniel T. Staal --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------