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

Re: hide pgp or smime signatures ?



On 2007-10-09, Nicolas KOWALSKI <niko@xxxxxxxxxxxxxxxxx> wrote:
> On Tue, Oct 09, 2007 at 11:06:00AM -0700, Gary Johnson wrote:
> > On 2007-10-09, Nicolas KOWALSKI <niko@xxxxxxxxxxxxxxxxx> wrote:
> > > Is it possible to not display the pgp or smime signature at all in 
> > > the pager ?
> > > 
> > I set 'display_filter' to a script that cleans up a number of 
> > message artifacts including such signatures.  Here is part of it.
> 
> Thanks for your code.
> 
> Unfortunately it looks it does not help. :-( 
> 
> I have written a small shell script containing your code, and set 
> display_filter=/home/niko/bin/mutt-display-filter in .muttrc, but I 
> still see the pgp/smime indications in the pager. I must be doing 
> something wrong...

My muttrc is pretty complicated, so I tried to simplify the 
situation in my previous reply.  Perhaps I simplified too much and 
overlooked some important details.

In particular, I have sets of message-hooks nested within 
folder-hooks to select different display-filters for different 
situations.  The code snippet I included before was from the 
display-filter I use for the Cygwin lists.  I thought it would work 
in general, but it appears that it doesn't.  For example, it doesn't 
work for Kyle Wheeler's recent message to this list regarding 
Procmail.

This is what I actually use when reading the mutt lists.

folder-hook +Incoming/.         'message-hook ~A                '\''set 
display_filter="sed  '\'\\\'\''/^.*\\[-- .* --]$/d'\'\\\'\''"'\'''

That is one line.  It removes all lines that begin with an invisible  
escape sequence followed by "[-- " and end with " --]".  It removes 
the lines

[-- BEGIN PGP SIGNED MESSAGE --]

and

[-- END PGP SIGNED MESSAGE --]

at the top and bottom, respectively, of Kyle's message.  The code 
fragment I included before looks for slightly different BEGIN and 
END indications.

I'm not sure what to suggest to fix the indications you're seeing 
without actually seeing them myself.  I try to use filters that are 
not so general that I risk deleting portions of message text.  That 
means that they work in the particular situation for which I wrote 
them, but they may not work in other situations.

So, you can either play with the regular expressions in the filters 
I posted previously and see if you can get rid of those pgp/smime 
indications yourself, or you can post what you're seeing here and I 
can try to give a you filter that will work for that case.

Regards,
Gary