From owner-freebsd-questions@FreeBSD.ORG Thu Jul 1 03:55:11 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 2F4A516A4CE for ; Thu, 1 Jul 2004 03:55:11 +0000 (GMT) Received: from invasion.mail.pas.earthlink.net (invasion.mail.pas.earthlink.net [207.217.120.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CCEA43D39 for ; Thu, 1 Jul 2004 03:55:11 +0000 (GMT) (envelope-from algould@datawok.com) Received: from 20-74.lctv-b4.cablelynx.com ([24.204.20.74] helo=[192.168.63.10]) by invasion.mail.pas.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 4.34) id 1Bfsf4-0003wb-Oz; Wed, 30 Jun 2004 20:54:58 -0700 From: "Andrew L. Gould" To: Erik Trulsson Date: Wed, 30 Jun 2004 22:56:05 -0500 User-Agent: KMail/1.6.2 References: <200406302146.31818.algould@datawok.com> <20040701033701.GA23011@falcon.midgard.homeip.net> In-Reply-To: <20040701033701.GA23011@falcon.midgard.homeip.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406302256.05793.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69564776905774d2ac4bbb24f2e2a0a86d9cebfe86caf51696d0350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.204.20.74 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:55:11 -0000 On Wednesday 30 June 2004 10:37 pm, Erik Trulsson wrote: > On Wed, Jun 30, 2004 at 09:46:31PM -0500, Andrew L. Gould wrote: > > Background: > > When I travel, I use access a home server via ssh and deal with my > > email using console applications. I obtain my email from several > > sources using fetchmail. I have a .procmailrc file that properly > > puts the emails into specified mbox files -- so far so good. > > > > 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. > > > > If I let fetchmail put the emails into my system mbox and use > > formail to process the emails, copies of the emails get put into > > the correct mbox files and mutt will open the files; but I have to > > go back and manually delete the emails in my system mail box. > > > > How can I get both valid mbox files and without having to manually > > delete emails in my system folder? > > From the fetchmail(1) manpage: > > As each message is retrieved fetchmail normally delivers it via > SMTP to port 25 on the machine it is running on (localhost), just as > though it were being passed in over a normal TCP/IP link. The mail > will then be delivered locally via your system's MDA (Mail Delivery > Agent, usually sendmail(8) but your system may use a different > one such as smail, mmdf, exim, or qmail). All the delivery-control > mechanisms (such as .forward files) normally available through > your system MDA and local delivery agents will therefore work > automatically. > > From the procmail(1) manpage: > > If procmail is not installed globally as the default mail > delivery agent (ask your system administrator), you have to make > sure it is in- voked when your mail arrives. In this case your > $HOME/.forward file should contain the line below. Be sure to > include the single and dou- ble quotes, and unless you know your site > to be running smrsh (the SendMail Restricted SHell), it must be > an absolute path. > > "|exec /usr/local/bin/procmail || exit 75" I tried using the .forward file a couple of months ago -- it was a huge disaster. But then, the line above is much less complicated than the advice I received from one of my peers here. The line above worked wonderfully. Thanks, Andrew Gould