On 01Aug2016 21:18, Yubin Ruan <[email protected]> wrote:
I think I must be a newbie in mutt-user community. So, hi all.
Hi, and welcome!
I need some help here. I want to know how to organize all the message in
gmail
inbox. I used to the Thunderbird email client. Frankly it's a pretty nice email
client, with a cool feature call `message-filter`. It can move some messages to
some mailbox according to the pattern you give it. For example, it can move all
the messages whose `To` field in header contains `[email protected]` to a
mailbox/folder call `mutt-user`. This can even automatically happed when I start
Thunderbird. This help me keep my inbox clean when I have subscribed to a lot of
mailing lists.
Yes, most of us do something similar.
I know mutt can do pretty much the same things. But I don't know how to
exactly configure it. I try the instruction on the manual but thing just
doesn't work.
For example, in the index mode, I press `<shift>T`, and then
`some-header-string`, trying to tagged all the message that are sent to
`[email protected]`. But that doesn't work. So bad. I try some others, can't
make it yet.
"T" (upper case "t" == <shift>T) is bound to the <tag-pattern> command.
Tagging is briefly described in the "Using Tags" section:
http://www.mutt.org/doc/manual/#tags
With <tag-pattern>, the string you type at its prompt is a pattern, documented
here:
http://www.mutt.org/doc/manual/#patterns
If you just type a simple string such as [email protected] then that is
considered a "simple search". These are described in the section above, under
the table of modifiers. If you want to be more precise, you can use a modifier
such as:
~C [email protected]
to match messages with that in the To or CC headers.
All this does is _tag_ the matching messages. You can then move them by issuing
a <save-message> command, bound to "s". That normally works on the current
message, but you can have it work on all the tagged messages by issuing the
<tag-prefix> command first, bound to ";". So typing this:
;s
says to mutt that it should save all of the tagged messages to a folder. You
will be proompted for that folder name.
Can anyone tell me,
** How can I have that Thunderbird message filtering in mutt?(i.e., moving
some messages from inbox to other mailbox according to the `To` field or `Cc`
field)
** Is those ~ in mutt's manual(~e, ~T, ~B, etc.) stand for the <shift>
key?(I guess so because I have tried both `~T` and `<shift>T`, and only
`<shift>T`
have some effect.) If that is, seriously, why can't the author just place
something like <shift> or <S> in the manual? and what does the =, % prefix
mean?
No, the "~" is a literal tilde character. It does _not_ mean <shift>. The ~T,
~B etc operators are "pattern modifiers" for use in expressions which match
messages. So:
~f [email protected]
would match any message from me ("[email protected]" in the From: header). They are
case insensitive: "~t" and "~T" do different things; see the table of pattern
modifiers here:
http://www.mutt.org/doc/manual/#tab-patterns
You can write arbitrary Boolean expressions with this stuff. Broadly:
~ introduces a pattern modifier expression, often it will accept a regular
expression as its argument
= a few modifers come with "=", for expressions which search on the server
(== the IMAP server); they accept a fixed string, not a regular expression.
% modifers which match against groups. You can define groups of mail
% addresses in mutt, and ask for messages which involve those addresses.
While all this lets you search for and optionally move or copy or delete etc
messages, authomatic message filing is usually _not_ done by mutt itself. (Al
though you could by running a few commands automatically when mutt commences,
but managing that gets tedious very quickly).
Normal practice for mutt users is to file messages with a separate program as
they are collected. This works best with local storage: we collect our email
from the server with POP or IMAP and store in local folders on our computers.
We can walk you through setting up such an arrangement if you decide you want
to go this way.
If you're using GMail and wanting to keep your messages there I would recommend
setting up filter rules in GMail itself: it is capable of autofiling new
messages for you. The rules are a little crude, but they cover the common
cases.
Cheers,
Cameron Simpson <[email protected]> (who is actually wearing a black t-shirt
today)