Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Having changed the recipes, the mails don’t seem to get reparsed and moved on. How do I tell procmail to reparse the whole mailbox?

    procmail doesn’t parse your mailbox, it only directs mail that is fed to it to the right place according to its rules. So you have to feed the mails from your inbox to it. This is achieved using formail -s procmail < /your/mailspool. With -s, formail will parse its input and invoke the given program for each mail, feeding the mail to the program’s stdin. Very handy tool, it can do many neat things with mail.

    Although I can now choose a file, to go back to the system mailbox or another file, I have to quit mutt and start again. It keeps asking me to move messages to a local mailbox as well, which is getting to be annoying.

    Ah yes, I’d forgotten about this. Here are some pertinent bits from my .muttrc:

    set folder=~/Mail/
    set mbox=+Inbox
    set spoolfile=+Inbox

    source 'cd ~/Mail ; for box in * ; do echo mailboxes =/$box ; done |'

    macro pager c '<change-folder>?<toggle-mailboxes>'
    macro index c '<change-folder>?<toggle-mailboxes>'

    The source line generates one mailboxes =foo mutt command for each file in ~/Mail, and the macros make sure that when I hit c, I don’t get the file browser, but rather a list of all the mailboxes I have defined with the mailboxes command. (You can still switch to the file browser using Tab.)

    • Oh! And don’t forget to save the mails from your inbox/spoolfile to another place before you re-filter them, else they’ll show up in your inbox in duplicate. I usually do this simply by mving my spool out of the way before piping it into formail (it gets recreated automatically by procmail).

    • formail, great. I knew there must be something already to refeed without me having to write a script to do it :)

      Thanks for the .muttrc hints too. I'll add those in a bit and see how I get on. Thanks.