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

Re: mutt, spamcop, and vi: header weeding



On Fri 22 Dec 06, 10:24 AM, Toby <tobia.conforto@xxxxxxxx> said:
> Peter Jay Salzman wrote:
> > So I did this:
> > 
> >    set my_spamcop='p@xxxxxxxxx'
> >    macro pager F ":set noweed\n<forward-message>$my_spamcop\n:\set weed\n"
> >    send-hook . 'set signature="~/.sig"'
> >    send-hook $my_spamcop 'unset signature ; set mime_forward ; set
> >    editor=/bin/true; push y'
> >    fcc-hook  $my_spamcop /dev/null
> > 
> > to take a look at what spamcop would receive.  Unfortunately, the
> > headers were weeded.   :(
> 
> Why is there a backslash before "set weed" there?
> 
> If that doesn't solve it, try this:
> 
>     set my_spamcop='p@xxxxxxxxx'
>     macro pager F ":set noweed\n<forward-message>$my_spamcop\n"
>     send-hook . 'set signature="~/.sig"'
>     send-hook $my_spamcop 'unset signature; set mime_forward; 
>                            set editor=/bin/true; push y; set weed'
>     fcc-hook  $my_spamcop /dev/null
> 
> 
> Toby



I think I owe you and Gary a big apology.

Tonight I was playing around and discovered to my shock and astonishment
that the mime attached email is affected by the weeding.

In other words, all those times that I thought that the email was shipped
off without the full headers, I was wrong.  The full headers were actually
there.  But since the macro says:

   macro pager F ":set noweed\n<forward-message>$my_spamcop\n:set weed\n"

when the macro finishes, the headers are weeded again.

My mistake was thinking that the mime attached email's headers wouldn't be
weeded... that they would display in full.  Apparently, that's not true,
because when I hit "h" (headers), I see the full headers...


   [-- Attachment #1 --]
   [-- Type: text/plain, Encoding: 7bit, Size: 0K --]
   Content-Type: text/plain; charset=us-ascii
   Content-Disposition: inline


   [-- Attachment #2 --]
   [-- Type: message/rfc822, Encoding: 7bit, Size: 2.4K --]
   Content-Type: message/rfc822
   Content-Disposition: inline

   Return-Path: limpfabrications@xxxxxxxxxxxx
   X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on
           satan.diablo.localnet
   X-Spam-Level: *
   X-Spam-Status: No, score=1.7 required=5.0
   tests=BAYES_50,DATE_IN_FUTURE_06_12
           autolearn=no version=3.1.7
   X-Original-To: p@xxxxxxxxx
   Delivered-To: p@xxxxxxxxx
   Received: from madamme.comclark.com (unknown [202.69.185.19])
           by satan.diablo.localnet (Postfix) with ESMTP id 9DC5F429BA


   (and so on).



So here is the solution for vim + mutt + spamcop.  It works:


   set my_spamcop='Put Your Spamcop Submit Address Here'
   macro pager F ":set noweed\n<forward-message>$my_spamcop\n:set weed\n"
   send-hook . 'set signature="~/.sig"'
   send-hook . unset mime_forward   # Set for spamcop
   send-hook $my_spamcop 'unset signature ; set mime_forward ; set 
editor=/bin/true; push y'
   fcc-hook  $my_spamcop /dev/null


Additionally, using <display-toggle-weed> works but the "set weed/noweed" is
shorter and fits in 80 columns better.   :-)

I'm sorry for leading you on a wild goose chase...  Thank you both kindly!

Sincerely,
Pete

-- 
How VBA rounds a number depends on the number's internal representation.
You cannot always predict how it will round when the rounding digit is 5.
If you want a rounding function that rounds according to predictable rules,
you should write your own.
              -- MSDN, on Microsoft VBA's "stochastic" rounding function

Peter Jay Salzman, email: p@xxxxxxxxx web: http://www.dirac.org/p    
PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D