My mail trials seem to be dragging on. After figuring out the various configs from FAQs, HowTos, man pages and various websites, I've got further with my mail. Not all the way, but further.
fetchmail
I now have fetchmail working. This was the easy part, but then the config is 4 lines long, so I'd be hard pushed to screw that up ;)
procmail
I have created a set of recipes and apart from an initial hiccup, with a bad regex on my part, it appears to be able to pick up mail and put the filtered ones into the correct files. It's saving in mbox format, and checking the files by hand, they all seem to be correct. However, I still seem to have a problem. A couple of the recipes were incomplete, and as such a number of mails got left in my system mailbox. 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?
mutt
Well mutt is better than mail, but I have hit a problem. Getting procmail to filter all the mails into various mbox files is great, but only if you can navigate through them easily. mutt doesn't even see them initially, it just loads up all the mails in my system mailbox. I set the .muttrc file to include 'set folder=~/Mail' but that didn't seem to work. I then discovered the command ESC-c and '?' for the directory list. 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. I filter the damn things to be in separate files, why would I want them back in one great big file again? I guess I must have missed something, because so many people think its so great.
Thunderbrd
After the half-working mutt, I did expect Thunderbird to be a breeze. It has a shiny GUI after all. Alas it was non-starter. I can't get it to look at any folders that I want it to, even though it claims to support mbox format. I can't even get it to import files and redo my recipes in procmail. I think I actually need to sit down with someone so they can point out quite clearly the fundamental flaws in my research and reading.
It really can't be this awkward to set up a mail client, can it?
Re:mutt info
barbie on 2005-11-14T19:00:40
Excellent, thanks for the info. I'll try out those commands when i get back home tonight. I did notice something about the yes/no/ask-yes/ask-no stuff in one of the websites I found, but it didn't include examples, so I wasn't clear what I was supposed to do with them. Will dig a little deeper now:)
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 <
. 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.)
Re:
Aristotle on 2005-11-14T23:10:55
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
mv
ing my spool out of the way before piping it intoformail
(it gets recreated automatically byprocmail
).Re:
barbie on 2005-11-15T08:25:28
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.
Re:Lowering the annoyance factor
barbie on 2005-11-15T08:27:56
and...
set move=no
;)
Thanks for the extra hints.