Re: Attachments (Was Re: Bleh - MS attachements)

1999-03-10 Thread Stephen Hack

The attached perl script handles removing of the tnef attachment##

it's worked for me.  (might want to test with a large assortment of message to
make sure that you're not loosing the attachments.)

##
## Remove the ms-tnef attachments
##

:0 
* B ?? ^Content-Type: \/(application/ms-tnef)$
{
LOG="--found garbage--"

# save backups
:0 c
$PMDIR/save.ms-tnef

:0 f
| $PMDIR/remove-attachment" "$MATCH
}


  On Wed, Mar 03, 1999 at 08:12:54PM +0100, Christian Stigen Larsen wrote:
   Is there any patch, utility, script or something which
   can decode typical MS-attachements like
   
 [applica/ms-tnef, base64, 1.4M]
   
   As I continually get these type of attachements life is
   really annoying, as I can't decode them (and the senders
   won't attach in another format).

-- 
Stephen P. Hackmutt - vim - maildrop http://www.uiuc.edu/ph/www/shack
[EMAIL PROTECTED]  Underwater Hockey Pres http://www.uiuc.edu/ro/uwhockey
[EMAIL PROTECTED] University of IllinoisComputer Science


#!/home/shack/bin/perl

$mime = join ' ', @ARGV;
@ARGV = ();

$message = join '', ;
$message =~ /Content-Type:[^\n]*boundary=(".*")/;
$boundary = $1;
$boundary =~ s/"//g;  #"

$date = scalar localtime;

$message =~ s/--$boundary\nContent-Type: 
$mime[\s\S]*\n--$boundary/\n--$boundary\nContent-Type: text\/plain\n\nRemoved a 
message of type $mime\n\n$0: $date\n\n\n--$boundary/m;

print $message;



Attachments (Was Re: Bleh - MS attachements)

1999-03-04 Thread John Adams

On Wed, 3 Mar 1999, fred smith wrote:

 On Wed, Mar 03, 1999 at 08:12:54PM +0100, Christian Stigen Larsen wrote:
  Is there any patch, utility, script or something which
  can decode typical MS-attachements like
  
  [applica/ms-tnef, base64, 1.4M]
  
  As I continually get these type of attachements life is
  really annoying, as I can't decode them (and the senders
  won't attach in another format).
 
 gripe-mode
 [deleted text] 
 I tend to get stiff-necked and tell them i can't read their mail,
 it's got some kind of "strange junk" in it,... can they please 
 configure their mailer to send plain text?
 [deleted text]
 \gripe-mode

I regularly see annoying junk in e-mail.  I'm a hold-over from the 80s
internet before WWW.  I think a sig over four lines with ASCII art or long
rambling quotes is a waste.  But rather than bitch about it, I use
procmail to filter the crap.

-- 
John Adams   O-
[EMAIL PROTECTED]