From owner-freebsd-questions Fri Oct 30 02:50:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA17123 for freebsd-questions-outgoing; Fri, 30 Oct 1998 02:50:08 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pobox.com (lafra-62.mdm.mkt.execpc.com [169.207.80.190]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA16928 for ; Fri, 30 Oct 1998 02:49:59 -0800 (PST) (envelope-from hamilton@pobox.com) Message-Id: <199810301049.CAA16928@hub.freebsd.org> Received: (qmail 22917 invoked from network); 30 Oct 1998 04:54:53 -0600 Received: from localhost (HELO pobox.com) (127.0.0.1) by localhost with SMTP; 30 Oct 1998 04:54:53 -0600 To: "Jason C. Wells" cc: FreeBSD-questions Subject: Re: Mail Recovery In-reply-to: Your message of "Fri, 30 Oct 1998 00:01:36 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 30 Oct 1998 04:54:53 -0600 From: Jon Hamilton Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , "Jason C. Wells" wrote: } I buggered up procmail and now I have a file named :0: with 80 messages } in it. } } I moved the :0: file to /var/mail/jason thinking they would be filtered on } the next mail delivery. They are not. They are just sitting in there. Naturally. I'm not sure why you would expect procmail to filter messages already in your inbox; they're by definition already delivered. Anyway, all hope isn't lost. } I don't read mail from my ${MAIL} box under normal circumstances. All of } the traffic I gets put in a special mail folder so I can keep all my } FreeBSD traffic straight. } } I am using sendmail, fetchmail, and procmail. } } How can I force redelivery and filtering of these messages? There's an example in the procmail(1) man page that's probably a little verbose and over-general for your situation, but should work nonetheless (the important part is the formail -s procmail line): Procmail can also be invoked to postprocess an already filled system mailbox. This can be useful if you don't want to or can't use a $HOME/.forward file (in which case the following script could periodically be called from within cron(1), or whenever you start reading mail): #!/bin/sh ORGMAIL=/var/mail/$LOGNAME if cd $HOME && test -s $ORGMAIL && lockfile -r0 -l1024 .newmail.lock 2>/dev/null then trap "rm -f .newmail.lock" 1 2 3 13 15 umask 077 lockfile -l1024 -ml cat $ORGMAIL >>.newmail && cat /dev/null >$ORGMAIL lockfile -mu formail -s procmail <.newmail && rm -f .newmail rm -f .newmail.lock fi exit 0 BuGless 1997/04/11 14 PROCMAIL(1) PROCMAIL(1) -- Jon Hamilton hamilton@pobox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message