delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/20/14:08:31

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 20 Mar 2001 10:32:35 -0800 (PST)
From: Enoch Wu <enochw AT scn DOT org>
X-Sender: enochw AT scn
To: Malcolm Boekhoff <Malcolm DOT Boekhoff AT actfs DOT co DOT uk>
cc: Mutt Users Mailing List <mutt-users AT mutt DOT org>,
Cygwin News Group <cygwin AT sources DOT redhat DOT com>
Subject: Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
In-Reply-To: <006a01c0b122$577ce060$275c100a@actfs.co.uk>
Message-ID: <Pine.SUN.3.96.1010320101319.25605A-100000@scn>
MIME-Version: 1.0

Using Mutt to do the job is stretching it quite a bit. Sometimes you have
to use the right tool (like procmail) to do the job. However, the .muttrc
snippet below should work but it does require you to hold down the "y" key
while viewing the index page. The "save-hook" method gets around an
occasional problem you would have if you use the "tag-pattern" method.

save-hook  "~h cygwin@"  +cygwin
save-hook  "~h cygwin-apps@"  +cygwin-apps
save-hook  "~h cygwin-digest-help@"  +cygwin-digest-help
save-hook  "~h mutt-users@"  +mutt-users
save-hook  "~h yourlogin@ | ~h yourlogin2@ | ~f someperson@" +To.Me
save-hook  "~h *"  +other

macro index "y"	"<save-message><return>"  "Hold down y key to move
messages

Hope that helps.

---

On Tue, 20 Mar 2001, Malcolm Boekhoff wrote:

> I want to retrieve messages from a POP3 mailbox and move them into folders (using Mutt's pattern recognition expression operator
> "~C") depending upon their To: or Cc: headers.
> 
> N.B. I don't want to read the messages before they are moved. I want them moved into separate folders, so that I can switch to those
> folders to read the messages.
> 
> Once they have been moved into such folders, I don't want them moved again.
> 
> Can somebody please tell me what I should set up to do this? I have been lead to believe that I can use a macro to switch the
> "spoolfile", use the 'G' <fetch-mail> command then switch the spoolfile back to $MAIL, however, I don't really understand what I
> should set "spoolfile", "mbox" to. I thought I could maybe use "save-hook"s to do this, but the documentation is not very helpful on
> these, for simple-minds like mine.
> 
> What I want is:
> 
> +mutt
> +cygwin
> +mbox
> 
> I want all messages downloaded from the POP3 server to go into +mbox, but those matching "~C *cygwin*" to go into +cygwin and those
> matching "~C *mutt*" to go into +mutt. I want the messages moved before I read them.
> 
> 
> 
> 
> 


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019