Re: Searching for hook to save new read mail to its particular mailbox
On Fri, Sep 10, 2010 at 09:49:57AM +0200, j...@telefonica.net wrote: Nico, I will search for your macro to see what can I do with regular expressions. For your convenience: macro index , tag-pattern!~D^Jtag-prefix-condsave-message/path/to/some/maildir/^J^Jend-condsync-mailbox Move all undeleted messages to maildir folders Then use ',' to move all undeleted mail to a maildir. Change the tag-pattern to your liking, and, of course, the save-message path. Nico --
Re: Searching for hook to save new read mail to its particular mailbox
Thanks friends for your proposal. I like to receive all new mail in the same inbox and after read them, each one must be moved, if not deleted, to its final store mailbox according to list or author. Nico, I will search for your macro to see what can I do with regular expressions. -- Jose Angel Navarro Cortes email: j...@telefonica.net web: http://janc.es/ Usuario Linux: #49178 El 10.09.09 23:13:35 Nicolas Williams dijo: On Thu, Sep 09, 2010 at 06:53:07AM -0700, Michael Elkins wrote: On Tue, Sep 07, 2010 at 12:57:51PM +0200, j...@telefonica.net wrote: I'm searching about a hook that will save to its mailbox all mails with To: list_...@server.com after had read them, I think when changing mailboxes. Now, I received all mails to +spoolfile but I would like to move with a hook the ones coming To: list_...@server.com after had read them. I have tried with save-hook, fcc-hook, but I can't find which one will do that move or copy. Mutt does not really have any automatic filtering built in. What most people do in this situation is to use something like procmail to filter incoming mail into separate mailboxes per email list, then put mailboxes +list1 +list2 in their ~/.muttrc to be informed when each mailbox has new mail. Mutt has a wonderful regular expression language that makes it easy to write small, powerful search expressions. Searches are filters, really (see gmail). It seems like a pity that mutt doesn't have a first-class filter. Procmail is not easy to use by comparison to mutt. Sure, sure, if you're using a text-based MUA you can write procmail filters. True. But for some use cases external programs like getmail, fetchmail and procmail all fall short. For example, I've given up on fetchmail because it dropped 30K messages once (from a 100K msg folder). I've given up on getmail because it doesn't preserve message flags, so if I've an IMAP Inbox that I want to leave a few days' worth of messages at a time for accessing from multiple MUAs (say, mobiles), then I can't use getmail to later move those off the IMAP server. (No, the getmail maintainer was not interested in patches to preserve message status/flags.) If I use IMAP, can't or don't leave mail on the server, but can use neither getmail nor fetchmail then how am I to use procmail? So I use mutt as a mail fetcher. It's easy: I've a simple macro that tags all un-deleted messages and the tag-saves them to their destination (I've posted this macro before). It'd be easy to add multiple steps, with each step tagging messages matching a given filter, then tag-saving to specific folders. Well, 'easy' is relative -- easy for me, but then, I don't file e-mail (I depend on searches). Mutt could provide this off the shelf, and then it would be really easy. Seems like a shame to have a great search language that cannot also be used for writing filters. Mutt has everything it needs to replace that getmail/fetchmail/procmail mix -- only the finishing touches are missing. Nico --
Re: Searching for hook to save new read mail to its particular mailbox
* Nicolas Williams nicolas.willi...@oracle.com [09-10-10 00:19]: But for some use cases external programs like getmail, fetchmail and procmail all fall short. For example, I've given up on fetchmail because it dropped 30K messages once (from a 100K msg folder). I've given up on getmail because it doesn't preserve message flags, so if I've an IMAP Inbox that I want to leave a few days' worth of messages at a time for accessing from multiple MUAs (say, mobiles), then I can't use getmail to later move those off the IMAP server. (No, the getmail maintainer was not interested in patches to preserve message status/flags.) If I use IMAP, can't or don't leave mail on the server, but can use neither getmail nor fetchmail then how am I to use procmail? simple. Use mutt as you do now and access your mail from outside via ssh. -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org
Re: Searching for hook to save new read mail to its particular mailbox
On Tue, Sep 07, 2010 at 12:57:51PM +0200, j...@telefonica.net wrote: I'm searching about a hook that will save to its mailbox all mails with To: list_...@server.com after had read them, I think when changing mailboxes. Now, I received all mails to +spoolfile but I would like to move with a hook the ones coming To: list_...@server.com after had read them. I have tried with save-hook, fcc-hook, but I can't find which one will do that move or copy. Mutt does not really have any automatic filtering built in. What most people do in this situation is to use something like procmail to filter incoming mail into separate mailboxes per email list, then put mailboxes +list1 +list2 in their ~/.muttrc to be informed when each mailbox has new mail. me
Re: Searching for hook to save new read mail to its particular mailbox
On Thu, Sep 09, 2010 at 06:53:07AM -0700, Michael Elkins wrote: On Tue, Sep 07, 2010 at 12:57:51PM +0200, j...@telefonica.net wrote: I'm searching about a hook that will save to its mailbox all mails with To: list_...@server.com after had read them, I think when changing mailboxes. Now, I received all mails to +spoolfile but I would like to move with a hook the ones coming To: list_...@server.com after had read them. I have tried with save-hook, fcc-hook, but I can't find which one will do that move or copy. Mutt does not really have any automatic filtering built in. What most people do in this situation is to use something like procmail to filter incoming mail into separate mailboxes per email list, then put mailboxes +list1 +list2 in their ~/.muttrc to be informed when each mailbox has new mail. Mutt has a wonderful regular expression language that makes it easy to write small, powerful search expressions. Searches are filters, really (see gmail). It seems like a pity that mutt doesn't have a first-class filter. Procmail is not easy to use by comparison to mutt. Sure, sure, if you're using a text-based MUA you can write procmail filters. True. But for some use cases external programs like getmail, fetchmail and procmail all fall short. For example, I've given up on fetchmail because it dropped 30K messages once (from a 100K msg folder). I've given up on getmail because it doesn't preserve message flags, so if I've an IMAP Inbox that I want to leave a few days' worth of messages at a time for accessing from multiple MUAs (say, mobiles), then I can't use getmail to later move those off the IMAP server. (No, the getmail maintainer was not interested in patches to preserve message status/flags.) If I use IMAP, can't or don't leave mail on the server, but can use neither getmail nor fetchmail then how am I to use procmail? So I use mutt as a mail fetcher. It's easy: I've a simple macro that tags all un-deleted messages and the tag-saves them to their destination (I've posted this macro before). It'd be easy to add multiple steps, with each step tagging messages matching a given filter, then tag-saving to specific folders. Well, 'easy' is relative -- easy for me, but then, I don't file e-mail (I depend on searches). Mutt could provide this off the shelf, and then it would be really easy. Seems like a shame to have a great search language that cannot also be used for writing filters. Mutt has everything it needs to replace that getmail/fetchmail/procmail mix -- only the finishing touches are missing. Nico --
Searching for hook to save new read mail to its particular mailbox
Hi all. I'm searching about a hook that will save to its mailbox all mails with To: list_...@server.com after had read them, I think when changing mailboxes. Now, I received all mails to +spoolfile but I would like to move with a hook the ones coming To: list_...@server.com after had read them. I have tried with save-hook, fcc-hook, but I can't find which one will do that move or copy. I already move the ones I send to that list with: fcc-hook '~t \\list_...@server\.com\\' ~/mail/list_one Thanks in advanced for your help. Best regards. -- Jose Angel Navarro Cortes email: j...@telefonica.net web: http://janc.es/ Usuario Linux: #49178
Re: Searching for hook to save new read mail to its particular mailbox
=- j...@telefonica.net wrote on Tue 7.Sep'10 at 12:57:51 +0200 -= I'm searching about a hook that will save to its mailbox all mails with To: list_...@server.com after had read them, I think when changing mailboxes. Use macro rather than hook to save before change, replace your change-folder key with that macro. -- © Rado S. -- You must provide YOUR effort for your goal! EVERY effort counts: at least to show your attitude. You're responsible for ALL you do: you get what you give.