Re: need some help about organize message in mutt

2016-08-02 Thread cs

On 02Aug2016 08:05, Yubin Ruan  wrote:

really appreciate your help.


If you want to be more precise, you can use a modifier such as:

 ~C mutt-users@mutt.org

to match messages with that in the To or CC headers.


I have tried that, but when I press that ~ key, mutt give me some "key is not
bound. Press ? for help" message.(when I say I press the ~ key, I mean I press
~ , which would give you a ~ when you do normal typing, otherwise it's
just a ` )


Ah. The string above is a pattern expression. It is only meaningful at the 
prompt for  or  or searching. So what I should have asked 
you to type was:


 T~C mutt-users@mutt.org

so that the "T" () opens the prompt requesting a pattern, and only 
_then_ do you type the pattern "~C mutt-users@mutt.org".


You might also want to experiment with "l" (), which restricts your view 
of the mailbox to just the messages matching a pattern. This will give you an 
easy way to experiment with patterns, and is also a handy way to locate 
particular messages in a large mailbox. Use the pattern "." to undo a "limit": 
that is a regexp for "any character", and effectively matches every message.



That's weird. I have no idea why, but I guess maybe that's because of
my configuration setting, part of which I copy directly from other's blog:

   set index_format='%-20.20L %4C [%Z] %{%b %d} %-15.15F (%?l?%4l&%4c?) %s'
   color index green  default ~N # new
   color index red default ~D# deleted
   color index brightmagenta default ~T  # tagged
   color index brightyellow default ~F   # flagged
   set pager_index_lines=10
   bind index,pager \Ck  sidebar-prev  #previous folder in sidebar
   bind index,pager \Cj  sidebar-next  #next folder in sidebar
   bind index,pager \CO  sidebar-open  #open selected folder in sidebar
   macro index  b'toggle sidebar_visible'
   macro index  \cb  'toggle sidebar_visible'
   bind index   ddisplay-message
   bind index   gg   first-entry
   bind index   Glast-entry
   bind index   hnoop
   bind index   lnoop

that's all of my conf that are related to index view. Anything wrong ?


There's nothing wrong there, but I would feel unhappy about the "d" macro 
above. Normally "d" is bound to , so if you every open someone 
else's mutt, or open your own but bypassing the configuration above (which 
sometimes one wants to do), then "d" can easily lead to accidental deletion of 
messages.


Normally  will display a message, and i would advocate removing your "d" 
macro and just using . Safer all around.



>   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)


The simplest way to do that would be as you imagined:

 - tag the messages you want to move, for example by typing:

 T~C mutt-users@mutt.org

 - move ("save" in mutt parlance) these messages to another folder.

The key "s" is bound to . Normally that operates on the current 
message. What you want is to operate on all the tagged messages. This is done 
by prefixing the command with ";" which is bound to . You can do 
this with many operations (copy, delete, etc). So type:


 ;s

meaning . This will prompt you for a folder name for the 
messages.



>   ** Is those ~ in mutt's manual(~e, ~T, ~B, etc.) stand for the 
>   key?(I guess so because I have tried both `~T` and `T`, and only 
`T`
>   have some effect.) If that is, seriously, why can't the author just place
>   something like  or  in the manual? and what does the =, % prefix 
mean?

No, the "~" is a literal tilde character. It does _not_ mean
. The ~T, ~B etc operators are "pattern modifiers" for use in
expressions which match messages.  So:

 ~f c...@zip.com.au

would match any message from me ("c...@zip.com.au" in the From:
header). They are case insensitive: "~t" and "~T" do different
things;>


~f doesn't work either, because the ~ is not bound(as described above)


As discussed above, ~ only has meaning at a prompt asking for a pattern 
expression.  You need to type "T" or "l" first to get such a prompt.



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 there's some common practice I would really appreciate to hear some. Figuring
it out myself is kind of hard.


The practice varies very widely.

Many people use mutt to connect directly to IMAP servers such as GMail.

Alternatively, you arrange to collect your email from such servers (or your 
ISP's POP service, etc) and store it locally. Then use mutt to browse the local 
folders. Note here that mutt tends not to do the collecting, though it has pop 
and imap services and you _can_ collect

Re: need some help about organize message in mutt

2016-08-02 Thread Erik Christiansen
On 02.08.16 08:05, Yubin Ruan wrote:
? Attribution lost upthread:
> > 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 there's some common practice I would really appreciate to hear some. 
> Figuring
> it out myself is kind of hard.

Hey, this is *nix. It's only when someone says "You're all individuals."
that any of is likely to pipe up from the back with "I'm not!". ;-)

Googling for "procmail howto" showed more help than an average
old-school user would normally need, first up.
But there is much procmail config guidance in the procmailrc manpage.
(And it's first line says: "For a quick start, see NOTES at the end of
the procmail(1) man page." That shows how it might be automatically
invoked.
There's also "man procmailex" for useful examples.
Subscribing to the procmail mailing list would help while learning.

While learning, it might also be an idea to use an initial copying
recipe to duplicate all incoming mail in a backup mailbox, since it is
possible to lose mails by writing a faulty delivery recipe. (Look for
"safety net" in "man procmailex".

The manpages seem to be included in the procmail .deb package - at least
I don't see a procmail-doc package to bother with.

Erik


Re: need some help about organize message in mutt

2016-08-02 Thread Erik Christiansen
On 01.08.16 10:42, Thomas Schneider wrote:
> Yubin:
> 
> > How can I have that Thunderbird message filtering in mutt?
> 
> I have been using procmail to filter mail into different mail boxes.
> Then I look at those boxes with mutt under a script that opens each
> one.  This allows me to categorize my junk mail and then move them to
> my main mail box if I want to keep one.

There's no need for any script. Once procmail has sorted incoming mail
into a bunch of mailboxes, e.g. one per mailing list, etc., then in
.muttrc, something like:

mailboxes +/family_u /var/spool/mail/erik +/avr_gcc_u +/vim_u +/mutt_u
mailboxes +/procmail_u +/todo +/cnc_linux_u +/luv-main +/binutils_u
mailboxes ~/postponed  # So it's accessible in the 'y' list.

Now mutt presents the highest priority mailbox which has new mail, and
'c' changes folder to the next highest with new mail, skipping any stale
ones in between.

I have some simple spam filtering, and should maybe add +/spam as the
last mailbox, as a reminder to look in there once in a blue moon for
false positives.

The stuff I want to keep goes into ~ 1200 categorised mailboxes.

Erik