From owner-freebsd-questions@FreeBSD.ORG Thu Jul 1 03:37:09 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 4182D16A4CF for ; Thu, 1 Jul 2004 03:37:09 +0000 (GMT) Received: from av11-2-sn4.m-sp.skanova.net (av11-2-sn4.m-sp.skanova.net [81.228.10.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EC8543D45 for ; Thu, 1 Jul 2004 03:37:08 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av11-2-sn4.m-sp.skanova.net (Postfix, from userid 502) id 11BCE37E49; Thu, 1 Jul 2004 05:37:02 +0200 (CEST) Received: from smtp4-2-sn4.m-sp.skanova.net (smtp4-2-sn4.m-sp.skanova.net [81.228.10.180]) by av11-2-sn4.m-sp.skanova.net (Postfix) with ESMTP id F413D37E42 for ; Thu, 1 Jul 2004 05:37:01 +0200 (CEST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp4-2-sn4.m-sp.skanova.net (Postfix) with SMTP id B413C37E42 for ; Thu, 1 Jul 2004 05:37:01 +0200 (CEST) Received: (qmail 24385 invoked by uid 1001); 1 Jul 2004 03:37:01 -0000 Date: Thu, 1 Jul 2004 05:37:01 +0200 From: Erik Trulsson To: "Andrew L. Gould" Message-ID: <20040701033701.GA23011@falcon.midgard.homeip.net> Mail-Followup-To: "Andrew L. Gould" , FreeBSD Questions 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> User-Agent: Mutt/1.5.6i 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:37:09 -0000 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" -- Erik Trulsson ertr1013@student.uu.se