From owner-freebsd-isp@FreeBSD.ORG Tue Jul 18 17:36:37 2006 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DCC316A4DE for ; Tue, 18 Jul 2006 17:36:37 +0000 (UTC) (envelope-from lyndon@orthanc.ca) Received: from orthanc.ca (orthanc.ca [209.89.70.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F3D043D73 for ; Tue, 18 Jul 2006 17:36:29 +0000 (GMT) (envelope-from lyndon@orthanc.ca) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by orthanc.ca (8.13.4/8.13.4) with ESMTP id k6IHaO0B043952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Jul 2006 11:36:24 -0600 (MDT) (envelope-from lyndon@orthanc.ca) Date: Tue, 18 Jul 2006 11:36:24 -0600 (MDT) From: Lyndon Nerenberg To: "David J. Orman" In-Reply-To: Message-ID: <20060718113009.L43660@orthanc.ca> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on orthanc.ca Cc: freebsd-isp@freebsd.org Subject: Re: Fix dates via IMAP on messages X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2006 17:36:37 -0000 > All of my new mail is fine (I run my mailserver now) but my mail from > about 7-10 years ago is all the date of the migration. Is there any > program out there that will read the headers of the mail and change the > server-date of the files? I've tried imapsync with -syncinternaldate, to > see if it read headers, but it doesn't. I just want to be able to run > the command on the user/imap server of choice, and have it read all the > mail headers, and set the creation dates properly on the mails (all via > IMAP). I'm not aware of a tool that will do this, but writing a program to handle this is trivial. All it needs to do is read the message until you find the date header, parse the date, then call utimes() to update the file's mtime. If you need an RFC822 date parser, look for the infamous getdate.y. --lyndon