Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On 2001-03-22 09:50:40, Enoch Wu wrote: Greetings, Will someone test the following for me. Thanks in advance! # If tagged, then save message with hooks applied. Must predefine # save-hooks. # One macro does all the mail "redirect". macro index "\cy" "tag-pattern~C *\n:push tag-prefixsave-message\n\n" You are a swearword/ genius. Thankyou! For the benefit of anyone else looking at this thread, don't forget the space between "push" and "tag-prefix". Hope it helps. -ew I hear you -- but I haven't solved the " no files tagged, so do nothing" issue. Like I said above -- DON'T use the macros that you don't need for the time being, until we come up with a "slicker than snot on a door-knob" solution. ;,) Again -- color-code the "groups" of messages in your /etc/muttrc file, then use the appropriate macro. Later... -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On Thu, Mar 22, 2001 at 09:50:40AM -0800, Enoch Wu wrote: Greetings, Will someone test the following for me. Thanks in advance! # If tagged, then save message with hooks applied. Must predefine # save-hooks. # One macro does all the mail "redirect". macro index "\cy" "tag-pattern~C *\n:push tag-prefixsave-message\n\n" Hope it helps. -ew I hear you -- but I haven't solved the " no files tagged, so do nothing" issue. Like I said above -- DON'T use the macros that you don't need for the time being, until we come up with a "slicker than snot on a door-knob" solution. ;,) Again -- color-code the "groups" of messages in your /etc/muttrc file, then use the appropriate macro. Later... It didn't work for me as *I* expected! ;( The macro tagged the entire $spoolfile in the "main" index, and turned around and saved the whole thing to only one of my pre-defined IN.x mailboxes. Here's how I've defined my "save-hook"s: save-hook "(~C freebsd-question@) | (~C questions@)" +IN.freebsd save-hook "~t .BAMA.UA.EDU" +IN.mercury save-hook "~C @mutt.org" +IN.mutt save-hook "(~C @cygwin)|(~C cygwin@)" +IN.cygwin save-hook "~C php-db" +IN.php-db Do they look like yours? Is the macro working for you? Later... -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On Fri, Mar 23, 2001 at 06:10:40AM -0700, Duke Normandin wrote: On Thu, Mar 22, 2001 at 09:50:40AM -0800, Enoch Wu wrote: Greetings, Will someone test the following for me. Thanks in advance! # If tagged, then save message with hooks applied. Must predefine # save-hooks. # One macro does all the mail "redirect". macro index "\cy" "tag-pattern~C *\n:push tag-prefixsave-message\n\n" Hope it helps. -ew I hear you -- but I haven't solved the " no files tagged, so do nothing" issue. Like I said above -- DON'T use the macros that you don't need for the time being, until we come up with a "slicker than snot on a door-knob" solution. ;,) Again -- color-code the "groups" of messages in your /etc/muttrc file, then use the appropriate macro. Later... It didn't work for me as *I* expected! ;( The macro tagged the entire $spoolfile in the "main" index, and turned around and saved the whole thing to only one of my pre-defined IN.x mailboxes. Here's how I've defined my "save-hook"s: save-hook "(~C freebsd-question@) | (~C questions@)" +IN.freebsd save-hook "~t .BAMA.UA.EDU" +IN.mercury save-hook "~C @mutt.org" +IN.mutt save-hook "(~C @cygwin)|(~C cygwin@)" +IN.cygwin save-hook "~C php-db" +IN.php-db Do they look like yours? Is the macro working for you? Later... -- -duke Calgary, Alberta, Canada I use multiple macros to get the filtering to work. Below my save-hooks commands, I added the following: macro index "\ef" "\ez\cy\ex\ey" "Move mails to mailboxes" macro index "\cy" "tag-pattern~C mutt-users@\n:push tag-prefixsave-message\n\n$" macro index "\ex" "tag-pattern~C cygwin-digest-h\n:push tag-prefixsave-message\n\n$" macro index "\ey" "tag-pattern~C cygwin-apps@\n:push tag-prefixsave-message\n\n$" macro index "\ez" "tag-pattern~C cygwin@\n:push tag-prefixsave-message\n\n$" macro index "\ew" "tag-pattern~C enochw@ | ~C ewu@ | ~f support@\n:push tag-prefixsave-message\n\n$" Hope that helps. ew
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On Fri, Mar 23, 2001 at 08:30:43AM -0800, Enoch Wu wrote: It didn't work for me as *I* expected! ;( The macro tagged the entire $spoolfile in the "main" index, and turned around and saved the whole thing to only one of my pre-defined IN.x mailboxes. Here's how I've defined my "save-hook"s: save-hook "(~C freebsd-question@) | (~C questions@)" +IN.freebsd save-hook "~t .BAMA.UA.EDU" +IN.mercury save-hook "~C @mutt.org" +IN.mutt save-hook "(~C @cygwin)|(~C cygwin@)" +IN.cygwin save-hook "~C php-db" +IN.php-db Do they look like yours? Is the macro working for you? Later... I use multiple macros to get the filtering to work. Below my save-hooks commands, I added the following: Show me (us) your save-hooks please! I want to compare to what I have above. Thanks! -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On Fri, Mar 23, 2001 at 05:47:44PM -0700, Duke Normandin wrote: Show me (us) your save-hooks please! I want to compare to what I have above. Thanks! -- -duke Calgary, Alberta, Canada Hi, # Mutt's Mail Filtering # Filename: portion of .muttrc # Mutt version 1.2.5i mailboxes ! +IN.personal +IN.mutt-users +IN.cygwin-digest-help mailboxes +IN.cygwin-apps +IN.cygwin +IN.everything-else save-hook "~C enochw@ | ~C ewu@ | ~f support@" +IN.personal save-hook "~C mutt-users@" +IN.mutt-users save-hook "~f cygwin-digest-help@" +IN.cygwin-digest-help save-hook "~C cygwin-apps@" +IN.cygwin-apps save-hook "~C cygwin@" +IN.cygwin save-hook "~h *" +IN.everything-else # I'll just delete this one manually - possible SPAM. # If messages are tagged, then save messages using one matching save-hook. # If no message is tagged, then save the current message using save-hook. # ESCf transfers messages into their respective mailboxes. # ESCw transfers personal mails to my personal folder "IN.personal". macro index "\ef" "\ez\cy\ex\ey" "Move mails to mailboxes" macro index "\cy" "tag-pattern~C mutt-users@\n:push tag-prefixsave-message\n\n$" macro index "\ex" "tag-pattern~C cygwin-digest-h\n:push tag-prefixsave-message\n\n$" macro index "\ey" "tag-pattern~C cygwin-apps@\n:push tag-prefixsave-message\n\n$" macro index "\ez" "tag-pattern~C cygwin@\n:push tag-prefixsave-message\n\n$" macro index "\ew" "tag-pattern~C enochw@ | ~C ewu@ | ~f support@\n:push tag-prefixsave-message\n\n$" # EOF - mutt example.
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On 2001-03-21 16:38:53, Duke Normandin wrote: On Wed, Mar 21, 2001 at 06:17:31PM -, Malcolm Boekhoff wrote: Does anyone know if you can save all messages, instead of holding down the "y" key, which is macro'ed as specified below? Is there a way to execute the "y" macro N times, where N is the number of messages in a mail box? How about tag-prefixsave-messageenter saving messages to their "save-hook"'d places, instead of to the mailbox that the first message is "save-hook"ed to? I don't know what your problem is -- but I wrote the macros and they work for me. I hold down the CTRL key, then press "y", for example, and *all* the applicable messages get tagged, moved and deleted. I then press the next ESC or CTRL whatever for the next "group" of messages. I have messages in "!" color coded by "group" (i.e. mailing lists, personal, etc) so that I know at a glance which macro I should execute. -- -duke Calgary, Alberta, Canada Yes the macros work and thankyou for that. However, the problem I am experiencing with the macro is that: IF the tag-pattern doesn't match any messages THEN The following "tag-prefixsave-message+mailboxenter" command saves the currently selected message into "mailbox" file, even though it doesn't match anything. ENDIF I have tried using "save-hook" to specify the pattern for the default "." pattern, so that I can remove the "+mailbox" from the "save-message+mailboxenter" command (leaving "save-messageenter"), with the idea that if there weren't any tagged messages at that time, then at least the currently selected message would go in an appropriate place (via the "save-hook"), but that doesn't appear to work - you have to specify the mail-box or else the save-message command doesn't work. I want to abort or skip over the "save-message...enter" bit of the macro if the tag-prefix command returns an error or if you can detect that the tag-pattern command didn't select any messages. Alles Klar?
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Yes the macros work and thankyou for that. However, the problem I am experiencing with the macro is that: IF the tag-pattern doesn't match any messages THEN The following "tag-prefixsave-message+mailboxenter" command saves the currently selected message into "mailbox" file, even though it doesn't match anything. ENDIF I realize that the above is an outstanding issue with my macro(s), for which I have to find an acceptable solution. The way I get around this problem is to NOT execute a macro that you don't need. So then "how do I know *which* macro to execute?" -- you probably will ask. The answer is -- color coding the "index" when the $spoolfile is first read. S... I have all mutt-users msgs = brightred; cygwin=brightblue; personal=green; etc etc. I then execute the macro required as per the "color chart" ;) Works for me! I have tried using "save-hook" to specify the pattern for the default "." pattern, so that I can remove the "+mailbox" from the "save-message+mailboxenter" command (leaving "save-messageenter"), with the idea that if there weren't any tagged messages at that time, then at least the currently selected message would go in an appropriate place (via the "save-hook"), but that doesn't appear to work - you have to specify the mail-box or else the save-message command doesn't work. Granted mine is a somewhat uninformed opinion, butIMO, using "save-hook" with these macros is inviting trouble. AFAIK, the way I wrote the macros (i.e., explicitly loading the macro with a mailbox) overrides the save-hooks - so the msgs go where I want them to. Correct me if I'm wrong here you silent "Mutt Macro Maestros" (MMM) ! The only save-hooks I use is what I've set up as "default" -- used when I save a specific message after reading it. I want to abort or skip over the "save-message...enter" bit of the macro if the tag-prefix command returns an error or if you can detect that the tag-pattern command didn't select any messages. I hear you -- but I haven't solved the " no files tagged, so do nothing" issue. Like I said above -- DON'T use the macros that you don't need for the time being, until we come up with a "slicker than snot on a door-knob" solution. ;,) Again -- color-code the "groups" of messages in your /etc/muttrc file, then use the appropriate macro. Later... -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Greetings, Will someone test the following for me. Thanks in advance! # If tagged, then save message with hooks applied. Must predefine # save-hooks. # One macro does all the mail "redirect". macro index "\cy" "tag-pattern~C *\n:push tag-prefixsave-message\n\n" Hope it helps. -ew I hear you -- but I haven't solved the " no files tagged, so do nothing" issue. Like I said above -- DON'T use the macros that you don't need for the time being, until we come up with a "slicker than snot on a door-knob" solution. ;,) Again -- color-code the "groups" of messages in your /etc/muttrc file, then use the appropriate macro. Later... -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Does anyone know how to put an "if" construct inside one of these macros? You see, if there aren't any tagged messages (after you apply, say, tag-pattern ~C mutt-usersenter) then the tag-prefixsave-message sequence just saves the current message, probably to the wrong folder. - Original Message - From: "Duke Normandin" [EMAIL PROTECTED] To: "Malcolm Boekhoff" [EMAIL PROTECTED] Cc: "Mutt User List" [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 8:49 PM Subject: Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read. On Tue, Mar 20, 2001 at 10:32:35AM -0800, Enoch Wu wrote: 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-messagereturn" "Hold down y key to move messages 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. Hi I'm new to Mutt, so what follows may need some fine-tuning! I've set up the following macros in my /etc/muttrc file. In the "main index" where you first see the contents of your "spoolfile", I simply run each macro. So far, I haven't had a problem. Each "logical message groupings" - be they mailing lists; personal mail, etc. is "saved" each in their "mailbox". mailboxes `echo $HOME/mutt/folders/[A-Z]*` macro index "\cy" "tag-pattern~C questions@entertag-prefixsave-message=IN.freebsdenterdelete-messagesync-mailboxenter" macro index "\ey" "tag-pattern~C php-dbentertag-prefixsave-message=IN.php-dbenterdelete-messagesync-mailboxenter" macro index "\ez" "tag-pattern~C mutt-usersentertag-prefixsave-message=IN.muttenterdelete-messagesync-mailboxenter" macro index "\ex" "tag-pattern~C mercury@entertag-prefixsave-message=IN.mercuryenterdelete-messagesync-mailboxenter" macro index "\ec" "tag-pattern(~C cygwin@)|(~C @cygwin)entertag-prefixsave-message=IN.cygwinenterdelete-messagesync-mailboxenter" Works for me, and it's an easy way to "filter" your spoolfile. What's left over is usually spam or misc. "acceptable" stuff. If there's any MMMs ( Mutt Macro Maestro ) ;,) reading this post, I'm wondering how I could combine all of the above macros, into one huge one? If that's possible, would it then be possible to load the huge macro into a "push"? I'm thinking of a "push" command at the bottom of my /etc/muttrc file. Anyway Malcolm --- HTH! Later -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Does anyone know if you can save all messages, instead of holding down the "y" key, which is macro'ed as specified below? Is there a way to execute the "y" macro N times, where N is the number of messages in a mail box? How about tag-prefixsave-messageenter saving messages to their "save-hook"'d places, instead of to the mailbox that the first message is "save-hook"ed to? - Original Message - From: "Duke Normandin" [EMAIL PROTECTED] To: "Malcolm Boekhoff" [EMAIL PROTECTED] Cc: "Mutt User List" [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 8:49 PM Subject: Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read. On Tue, Mar 20, 2001 at 10:32:35AM -0800, Enoch Wu wrote: 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-messagereturn" "Hold down y key to move messages 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. Hi I'm new to Mutt, so what follows may need some fine-tuning! I've set up the following macros in my /etc/muttrc file. In the "main index" where you first see the contents of your "spoolfile", I simply run each macro. So far, I haven't had a problem. Each "logical message groupings" - be they mailing lists; personal mail, etc. is "saved" each in their "mailbox". mailboxes `echo $HOME/mutt/folders/[A-Z]*` macro index "\cy" "tag-pattern~C questions@entertag-prefixsave-message=IN.freebsdenterdelete-messagesync-mailboxenter" macro index "\ey" "tag-pattern~C php-dbentertag-prefixsave-message=IN.php-dbenterdelete-messagesync-mailboxenter" macro index "\ez" "tag-pattern~C mutt-usersentertag-prefixsave-message=IN.muttenterdelete-messagesync-mailboxenter" macro index "\ex" "tag-pattern~C mercury@entertag-prefixsave-message=IN.mercuryenterdelete-messagesync-mailboxenter" macro index "\ec" "tag-pattern(~C cygwin@)|(~C @cygwin)entertag-prefixsave-message=IN.cygwinenterdelete-messagesync-mailboxenter" Works for me, and it's an easy way to "filter" your spoolfile. What's left over is usually spam or misc. "acceptable" stuff. If there's any MMMs ( Mutt Macro Maestro ) ;,) reading this post, I'm wondering how I could combine all of the above macros, into one huge one? If that's possible, would it then be possible to load the huge macro into a "push"? I'm thinking of a "push" command at the bottom of my /etc/muttrc file. Anyway Malcolm --- HTH! Later -- -duke Calgary, Alberta, Canada
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On 010321, at 17:17:47, Malcolm Boekhoff wrote Does anyone know how to put an "if" construct inside one of these macros? Byrial Jensen posted a patch against 1.3.2 last spring which added an if command. Perhaps it is still available on one of the archives. -- David Ellement
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Malcolm Boekhoff proclaimed on mutt-users that: 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. Use fetchmail (or getmail if you are on windows) and procmail (or other mail filtering app which you can compile using cygwin and doze) -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis mallet @ cluestick.org + Lumber Cartel of India, tinlcI EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
I can compile fetchmail and it appears to work with Cygwin and NT, however it wants to connect to an SMTP server (it doesn't simply write into the ~/mail/mbox file. Hence I need an SMTP listener - is this procmail? - to receive from fetchmail and I suppose this (procmail) writes into ~/mail/mbox. Correct? Unfortunately, procmail does not compile out-of-the-box under Cygwin/NT. I was thinking that the fetchmail "-mta" or "-bsmtp" switch might make fetchmail put the messages into ~/mail/mbox (so that I wouldn't have to run an SMPT server), but saw the "Note that fetchmail's reconstruction of MAIL FROM and RCPT TO lines is not guaranteed correct; the caveats discussed under THE USE AND ABUSE OF MULTIDROP MAILBOXES below apply" note in the manual page and when I tried the "-bsmtp" switch, mutt didn't recognise the file created by fetchmail. So, I think that if I want to use fetchmail, I need to be running a local SMTP server, right? Does that mean procmail or sendmail, because neither of these will compile under Cygwin without a few days hair pulling. - Original Message - From: "Suresh Ramasubramanian" [EMAIL PROTECTED] To: "Mutt Users Mailing List" [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 9:55 AM Subject: Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read. Malcolm Boekhoff proclaimed on mutt-users that: 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. Use fetchmail (or getmail if you are on windows) and procmail (or other mail filtering app which you can compile using cygwin and doze) -- Suresh Ramasubramanian + Wallopus Malletus Indigenensis mallet @ cluestick.org + Lumber Cartel of India, tinlcI EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
Malcolm Boekhoff [EMAIL PROTECTED] wrote: I can compile fetchmail and it appears to work with Cygwin and NT, however it wants to connect to an SMTP server (it doesn't simply write into the ~/mail/mbox file. Hence I need an SMTP listener - is this procmail? - to receive from fetchmail and I suppose this (procmail) writes into ~/mail/mbox. Correct? No. fetchmail can be configured to deliver via an MDA like procmail instead of SMTP re-injection; it's just not the default config. However, as the author of getmail, I would urge you to consider trying getmail. It would suit your purposes, and be simpler to configure and maintain. Charles -- --- Charles Cazabon [EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: Mutt: Reading POP3 mail and moving the messages to folders based on To: and Cc: headers, before the messages are read.
On Tue, Mar 20, 2001 at 10:32:35AM -0800, Enoch Wu wrote: 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-messagereturn" "Hold down y key to move messages 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. Hi I'm new to Mutt, so what follows may need some fine-tuning! I've set up the following macros in my /etc/muttrc file. In the "main index" where you first see the contents of your "spoolfile", I simply run each macro. So far, I haven't had a problem. Each "logical message groupings" - be they mailing lists; personal mail, etc. is "saved" each in their "mailbox". mailboxes `echo $HOME/mutt/folders/[A-Z]*` macro index "\cy" "tag-pattern~C questions@entertag-prefixsave-message=IN.freebsdenterdelete-messagesync-mailboxenter" macro index "\ey" "tag-pattern~C php-dbentertag-prefixsave-message=IN.php-dbenterdelete-messagesync-mailboxenter" macro index "\ez" "tag-pattern~C mutt-usersentertag-prefixsave-message=IN.muttenterdelete-messagesync-mailboxenter" macro index "\ex" "tag-pattern~C mercury@entertag-prefixsave-message=IN.mercuryenterdelete-messagesync-mailboxenter" macro index "\ec" "tag-pattern(~C cygwin@)|(~C @cygwin)entertag-prefixsave-message=IN.cygwinenterdelete-messagesync-mailboxenter" Works for me, and it's an easy way to "filter" your spoolfile. What's left over is usually spam or misc. "acceptable" stuff. If there's any MMMs ( Mutt Macro Maestro ) ;,) reading this post, I'm wondering how I could combine all of the above macros, into one huge one? If that's possible, would it then be possible to load the huge macro into a "push"? I'm thinking of a "push" command at the bottom of my /etc/muttrc file. Anyway Malcolm --- HTH! Later -- -duke Calgary, Alberta, Canada