<<< Date Index >>>     <<< Thread Index >>>

Re: Sorting incoming mail by domain



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, May  7 at 05:00 PM, quoth Haines Brown:
>> So, either put mutt in a room with a corner (e.g. set up gpg 
>> correctly) OR don't tell mutt to stand in a corner whenever messages 
>> with signatures show up (e.g. set crypt_verify_sig=no).
>> 
>> Does that make sense?
>
> Yes, it sure does! Had no idea.

:)

For what it's worth, I think mutt's default setting for 
crypt_verify_sig is "yes", and that's probably not a great default, 
for precisely the reason that it can end up confusing people who 
didn't expect mutt to verify PGP signatures.

>>> However I'm used to saving messages as a plain text that I can 
>>> name and put into a default directory,
>> 
>> Why would you do that?
>
> Good question. Perhaps if I try an answer, you might tell me I'm just 
> making things unecessarly difficult for myself. Keep in mind I still 
> have habits left over from VAX and DOS.

With any luck, things have gotten easier since then!

> I use email primarily to obtain text and documents from one source 
> that I store in a very large and complex directory tree (perhaps 
> several thousand directories) by using a file manager to move them 
> where they are dumpted to their ultimate location. These documents 
> need a unique name to identify their location for sorting, to give 
> some idea of their content, and a date (other than the date the file 
> created).

Hmm. Okay, I have a better idea of *what* you're doing, but still not 
*why* you're doing it. Is this large and complex directory tree 
convenient for some important piece of software?

I mean, based on what you've said so far, I can only assume that your 
real goal here is that you want to be able to search and find your 
email quickly, right? And then, once you've found them, you want to 
read them with some piece of software... perhaps a text editor, 
perhaps something like mutt (I assume that mutt's display of email is 
sufficient for your needs?).

The way this is *usually* done is to keep all your messages in a 
single mailbox (or divided among several, if that's more convenient), 
and then use search functions to find what you want. For example, in 
mutt, if all my messages are in a single mailbox, I can easily and 
quickly show only those messages that contain the word "foo" in the 
subject by using the <limit> command (which is, by default, triggered 
by pressing esc-L) with a so-called "simple pattern" that looks like 
this: "~s foo" Or, if I want to see a list of messages  received the 
day before Christmas in the year 2000, I use a pattern like this: "~r 
24/12/2000". It's actually quite fast, even with very large 
collections of messages.

>> What are you trying to accomplish by saving messages as text files? 
>> And why are you trying to tell mutt to save them all with the same 
>> name?
>
> Actually, I may simply be confused The "s" command prompts me for a 
> mailbox: "Save to mailbox=<name of sender>. However, I find this does 
> not create a folder <name of sender>, but instead a file with that 
> name. So I may not have a problem after all.

What's happening there is that mutt "guesses" a default mailbox name 
to use based on the sender (you can change how mutt guesses by using 
save-hooks (that's what they're for)). Once you hit return to accept 
the name (or once you type in your own file name) mutt checks to see 
whether a mailbox by that name exists yet or not. If a mailbox by that 
name does not yet exist (which is what's happening), mutt creates the 
mailbox. It creates a mailbox based on the $mbox_type setting... which 
is a poorly named setting, but essentially it tells mutt what type of 
mailbox to create here. The default type is an "mbox" mailbox. An mbox 
mailbox is, simply, a text file containing a bunch of messages one 
after another.  (There are subtle details that make it a bit more 
complicated, because  mbox needs to be able to store multiple messages 
in a single file, but that's the central idea.) If there's only one 
message in the mbox file, it looks like it's just the raw text version 
of that message.

There are several other types of mailbox "formats" that mutt supports, 
including MMDF, MH, and Maildir. Maildir is the most common 
alternative to mbox---the other two seem to be on the way out in terms 
of popularity. All three of these others are *folders* that have an 
internal structure specific to holding mail files. For example, a 
Maildir file contains three subfolders: "cur", "new", and "tmp". Most 
of the time, all the actual messages in a Maildir mailbox are stored 
as individual files within the "cur" subfolder (the "new" and "tmp" 
folders are primarily used for delivering new messages to the Maildir 
quickly and safely).

That's probably more information than you needed, but maybe that helps 
you understand why mutt is doing what it's doing.

> My original question was how to handle mail from one server with rmail 
> and mail from another with mutt, and I gather procmail is my friend 
> here.

Yup - sorry to go too far off topic... but you never know, maybe this 
stuff is helpful for someone else who might read it.

~Kyle
- -- 
The important work of moving the world forward does not wait to be 
done by perfect men.
                                                        -- George Eliot
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkoDVaQACgkQBkIOoMqOI16rIACeNAy4bhJZMxOF2b8NIXC///Ip
cm8Amwe3thD7UQEtQqalmykVQgG4BuiJ
=4HCh
-----END PGP SIGNATURE-----