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

Re: [Mutt] #2201: <view-attach> a message/rfc822 misses



#2201: <view-attach> a message/rfc822 misses $display_filter
-----------------------------------------------+----------------------------
  Reporter:  mutt-bugs@xxxxxxxxxxxxxxxxxxxxxx  |       Owner:  mutt-dev
      Type:  defect                            |      Status:  new     
  Priority:  minor                             |   Milestone:          
 Component:  display                           |     Version:  1.5.11  
Resolution:                                    |    Keywords:          
-----------------------------------------------+----------------------------
Changes (by pdmef):

  * component:  mutt => display


Old description:

> {{{
> There are two issues regarding display filters:
> 1) I did a small perl script to strip multiple To: and Cc:
> lines (yes, I know there are other scripts that do the same
> but I wanted a simple one to add to my custom "adds remover"
> filter). It's quite simple:
>
> #####################################################
>
> #!/usr/bin/perl -p
>
> undef $/;
> s/((To:|Cc:).*\n)(^[\t\s].*\n)+(^[^ ].*)/\1    \[---=| STRIPPED
> |=---\]\n\4/mg;
>
> #####################################################
>
> It works very well stripping the anoying multiple lines
> in those headers BUT ONLY when mutt does not weed headers
> ('h' keyword). With stripped headers, it just does not work. I would
> expect to behave consistently.
>
> 2) I also use another filter to strip adds in messages,
> like the ones added by Yahoo and other mailing lists,
> or virus scan programs. I call the filters with
>
>   set display_filter='mutt-display.pl'
>
> in my .muttrc file.
>
>     However, I realized that when I receive a
> message diggest (many messages in one, that appear
> as separate 'message/rfc822' attachments), and I
> try to see one attachment, the filter programs
> are not called, and the adds are shown. I tried
> to configure my .mailcap with:
>
> message/rfc822; cat %s | mutt-display.pl ; copiousoutput
>
> but that didn't make any difference.
> >How-To-Repeat:
> For (1), just toggle the view of all the headers with 'h' of a mail with
> many To: addresses. When all headers are shown, the multiple To: and Cc:
> lines are stripped. When not shown, they are not stripped (i.e., the
> filter does not work).
> For (2), just try to see the attachments using 'v' and then ENTER in the
> corresponding message. For example, you can use the mutt mailing list
> daily diggest... :)
> >Fix:
> For (1), perhaps this is some silly regexp problem.
> Not a clue for (2).
> }}}

New description:

 {{{
 There are two issues regarding display filters:
 1) I did a small perl script to strip multiple To: and Cc:
 lines (yes, I know there are other scripts that do the same
 but I wanted a simple one to add to my custom "adds remover"
 filter). It's quite simple:

 #####################################################

 #!/usr/bin/perl -p

 undef $/;
 s/((To:|Cc:).*\n)(^[\t\s].*\n)+(^[^ ].*)/\1    \[---=| STRIPPED
 |=---\]\n\4/mg;

 #####################################################

 It works very well stripping the anoying multiple lines
 in those headers BUT ONLY when mutt does not weed headers
 ('h' keyword). With stripped headers, it just does not work. I would
 expect to behave consistently.

 2) I also use another filter to strip adds in messages,
 like the ones added by Yahoo and other mailing lists,
 or virus scan programs. I call the filters with

   set display_filter='mutt-display.pl'

 in my .muttrc file.

     However, I realized that when I receive a
 message diggest (many messages in one, that appear
 as separate 'message/rfc822' attachments), and I
 try to see one attachment, the filter programs
 are not called, and the adds are shown. I tried
 to configure my .mailcap with:

 message/rfc822; cat %s | mutt-display.pl ; copiousoutput

 but that didn't make any difference.
 >How-To-Repeat:
 For (1), just toggle the view of all the headers with 'h' of a mail with
 many To: addresses. When all headers are shown, the multiple To: and Cc:
 lines are stripped. When not shown, they are not stripped (i.e., the
 filter does not work).
 For (2), just try to see the attachments using 'v' and then ENTER in the
 corresponding message. For example, you can use the mutt mailing list
 daily diggest... :)
 >Fix:
 For (1), perhaps this is some silly regexp problem.
 Not a clue for (2).
 }}}

--

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2201#comment:9>
Mutt <http://www.mutt.org/>
The Mutt mail user agent