From owner-freebsd-questions@FreeBSD.ORG Thu Jul 1 03:47:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C58F816A4CE for ; Thu, 1 Jul 2004 03:47:53 +0000 (GMT) Received: from brain.otenet.gr (brain.otenet.gr [195.170.0.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35E4743D4C for ; Thu, 1 Jul 2004 03:47:52 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b198.otenet.gr [212.205.244.206]) i613lKD8027874; Thu, 1 Jul 2004 06:47:23 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i613FkxU018605; Thu, 1 Jul 2004 06:15:46 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i613FkSf018604; Thu, 1 Jul 2004 06:15:46 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 1 Jul 2004 06:15:46 +0300 From: Giorgos Keramidas To: "Andrew L. Gould" Message-ID: <20040701031546.GC18146@gothmog.gr> References: <200406302146.31818.algould@datawok.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406302146.31818.algould@datawok.com> cc: FreeBSD Questions Subject: Re: [OT] fetchmail, procmail and mutt (oh my!) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 03:47:54 -0000 On 2004-06-30 21:46, "Andrew L. Gould" wrote: > Problem: > If I put 'mda /usr/local/bin/procmail' in the .fetchmailrc lines, > procmail puts the emails in the correct mbox files; but mutt complains > that the files are not valid email files and refuses to read them. > [...] > Here's the top of .procmailrc and the freebsd recipe: > > MAILDIR=/home/algould/pmail > LOGFILE=$MAILDIR/procmail.log > VERBOSE=1 > DEFAULT=/home/algould/pmail/inbox > > :0 : > * .*freebsd > /home/algould/pmail/freebsd You're using a relatively strange way to specify the mailbox file name. Setting $MAILDIR in .procmailrc means that you can simply use: :0 H * ^sender: owner-freebsd-doc@freebsd.org freebsd-doc Note the lack of path name in the mailbox file. IMHO, it's simpler this way. You can even match all teh FreeBSD lists and save the messages in `properly' named mailboxes like this: :0 H * ^Sender: owner[^@]*@freebsd.org { :0 H * ^Sender: owner-cvs-\/[^@]* freebsd-cvs-$MATCH :0 H * ^Sender: owner-freebsd-\/[^@]* freebsd-$MATCH } Anyway, putting this aside for a while, you can see what procmail does to your messages with: VERBOSE=yes LOGABSTRACT=yes LOGFILE=$HOME/procmail.log Touch ~/procmail.log and start a tail -f on it. Then fire up fetchmail and watch the tail output. This should at least give you a hint about the actions of procmail. Once a few messages get delivered to a mailbox, say `freebsd-questions', stop fetchmail and look with a text editor at the mailbox file. If it's not corrupt, you should see something like this: giorgos@gothmog:~$ head mail/freebsd-questions | cat -vte From owner-freebsd-questions@freebsd.org Thu Jul 1 05:49:31 2004$ Received: from igloo.linux.gr (gothmog [127.0.0.1])$ ^Iby gothmog.gr (8.12.11/8.12.11) with ESMTP id i612nNiG018351$ ^Ifor ; Thu, 1 Jul 2004 05:49:31 +0300 (EEST)$ ^I(envelope-from owner-freebsd-questions@freebsd.org)$ Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])$ ^Iby igloo.linux.gr (8.12.10/8.12.10/Debian-2) with ESMTP id i612m2Oa002558$ ^Ifor ; Thu, 1 Jul 2004 05:48:06 +0300$ Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18])$ ^Iby mx2.freebsd.org (Postfix) with ESMTP$ giorgos@gothmog:~$ Look carefully at the first line. It shouldn't contain any special characters (like the ^I characters shown further down) and the format should be similar to the one above (starting with "From", followed immediately by the sender address and then by a timestamp/date). Otherwise, mailers will assume that this mailbox is either: a) broken b) not a mailbox file Then you'll have to investigate why your procmail thinks that it should use a mailbox format other than UNIX mbox. - Giorgos