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

Re: How to match an email by "the sender is in the address book"?



On Thu, Jun 25, 2009 at 01:24:15PM +0800, wei ribao wrote:
> I use mutt/gmail to subscribe and read a lot of mail-lists.By using mutt it 
> is really efficient to read and process large amount of emails. However, some 
> personal emails can be burried in these group emails. 
> 
> I wish to hight light those emails that their senders have been save in my 
> address book(mutt.alias). How can I match these emails?Is it possible in 
> mutt? What pattern should I use? 
> 
> I cann't find related stuff in the manul.Any clue is welcome!

excerpts from 'man muttrc':

###
       color object foreground background [  regexp ]
       color index foreground background [  pattern ]
       uncolor index pattern [ pattern ... ]

              If  your  terminal supports color, these commands can be used to
              assign foreground/background combinations  to  certain  objects.
              Valid  objects  are: attachment, body, bold, header, hdrdefault,
              index, indicator, markers,  message,  normal,  quoted,  quotedN,
              search, signature, status, tilde, tree, underline.  The body and
              header objects allow you to restrict the colorization to a regu‐
              lar  expression.  The index object permits you to select colored
              messages by pattern.

              Valid colors include: white, black, green, magenta, blue,  cyan,
              yellow, red, default, colorN.
###

then proceed to read what 'man muttrc' has to say about patterns:

###
  Constructing Patterns
       A simple pattern consists of an operator of the form “~character”, pos‐
       sibly  followed  by 
(...)
  Simple Patterns
       Mutt understands the following simple patterns:

       ~A          all messages
       ~b EXPR     messages which contain EXPR in the message body.
       =b STRING   messages which contain STRING in the message body. If  IMAP
(...)
       ~p          messages addressed to you (as defined by alternates)
       ~P          messages from you (as defined by alternates)
###

and an example from my muttrc:

###
color index brightgreen default "~p | ~P "
###

Cheers,
  Markus