Index: ripmime-1.4.0.10.debian.1/Makefile
===================================================================
--- ripmime-1.4.0.10.debian.1.orig/Makefile
+++ ripmime-1.4.0.10.debian.1/Makefile
@@ -34,9 +34,9 @@ LIBS=
 OBJ=ripmime 
 RIPOLE_OBJS= ripOLE/ole.o ripOLE/olestream-unwrap.o ripOLE/bytedecoders.o  ripOLE/bt-int.o
 #RIPOLE_OBJS=
-OFILES= strstack.o mime.o ffget.o MIME_headers.o tnef/tnef.o rawget.o pldstr.o logger.o libmime-decoders.o boundary-stack.o uuencode.o filename-filters.o $(RIPOLE_OBJS)
+OFILES= strstack.o mime.o ffget.o MIME_headers.o rawget.o pldstr.o logger.o libmime-decoders.o boundary-stack.o uuencode.o filename-filters.o $(RIPOLE_OBJS)
 
-default: tnef/tnef.o ripmime ripOLE/ole.o
+default: ripmime ripOLE/ole.o
 
 buildcodes.h: 
 	./generate-buildcodes.sh
@@ -44,9 +44,6 @@ buildcodes.h:
 ripOLE/ole.o:
 	./build_ripOLE
 
-tnef/tnef.o:
-	./build_tnef
-
 .c.o:
 	${CC} ${CFLAGS} $(COMPONENTS) -c $*.c
 
Index: ripmime-1.4.0.10.debian.1/mime.c
===================================================================
--- ripmime-1.4.0.10.debian.1.orig/mime.c
+++ ripmime-1.4.0.10.debian.1/mime.c
@@ -47,7 +47,6 @@
 #include "boundary-stack.h"
 #include "ffget.h"
 #include "mime.h"
-#include "tnef/tnef_api.h"
 #include "ripOLE/ole.h"
 #include "libmime-decoders.h"
 #include "uuencode.h"
@@ -156,7 +155,6 @@ struct MIME_globals {
 	char out_charset[MDECODE_ISO_CHARSET_SIZE_MAX];
 
 	int decode_uu;
-	int decode_tnef;
 	int decode_b64;
 	int decode_qp;
 	int decode_mht;
@@ -279,7 +277,6 @@ int MIME_set_debug( int level )
 	glb.debug = level;
 
 	BS_set_debug(level);
-	TNEF_set_debug(level);
 	MIMEH_set_debug(level);
 	MDECODE_set_debug(level);
 	UUENCODE_set_debug(level);
@@ -334,31 +331,6 @@ int MIME_set_recursion_level( int level
 	return glb.max_recursion_level;
 }
 
-/*-----------------------------------------------------------------\
-  Function Name	: MIME_set_decode_tnef
-  Returns Type	: int
-  ----Parameter List
-  1. int level , 
-  ------------------
-  Exit Codes	: 
-  Side Effects	: 
-  --------------------------------------------------------------------
-Comments:
-
---------------------------------------------------------------------
-Changes:
-
-\------------------------------------------------------------------*/
-int MIME_set_decode_tnef( int level )
-{
-	glb.decode_tnef = level;
-
-	TNEF_set_decode( level );
-
-
-	return level;
-}
-
 
 /*-----------------------------------------------------------------\
   Function Name	: MIME_set_decode_ole
@@ -581,7 +553,6 @@ int MIME_set_verbosity( int level )
 	glb.verbosity = level;
 
 	MIMEH_set_verbosity( level );
-	TNEF_set_verbosity( level );
 	FNFILTER_set_verbose( level );
 	UUENCODE_set_verbosity( level );
 	MDECODE_set_verbose( level );
@@ -637,7 +608,6 @@ int MIME_set_verbosity_contenttype( int
 	glb.verbosity_contenttype = level;
 	MIMEH_set_verbosity_contenttype( level );
 	UUENCODE_set_verbosity_contenttype( level );
-	TNEF_set_verbosity_contenttype( level );
 
 	return glb.verbosity_contenttype;
 }
@@ -709,7 +679,6 @@ int MIME_set_filename_report_fn( int (*p
 {
 	glb.filename_decoded_reporter = ptr_to_fn;
 	UUENCODE_set_filename_report_fn( ptr_to_fn );
-	TNEF_set_filename_report_fn( ptr_to_fn );
 
 	return 0;
 }
@@ -1227,35 +1196,6 @@ int MIME_getchar_start( FFGET_FILE *f )
 
 
 
-/*------------------------------------------------------------------------
-Procedure:     MIME_decode_TNEF ID:1
-Purpose:       Decodes TNEF encoded attachments
-Input:
-Output:
-Errors:
-------------------------------------------------------------------------*/
-int MIME_decode_TNEF( char *unpackdir, struct MIMEH_header_info *hinfo, int keep )
-{
-	int result=0;
-	char fullpath[1024];
-
-	snprintf(fullpath,sizeof(fullpath),"%s/%s",unpackdir,hinfo->filename);
-
-	TNEF_set_path(unpackdir);
-
-	result = TNEF_main( fullpath );
-
-	if (result >= 0)
-	{
-		//		result = remove( fullpath );
-		if (result == -1)
-		{
-			if (MIME_VERBOSE) LOGGER_log("%s:%d:MIME_decode_TNEF: Removing %s failed (%s)",FL,fullpath,strerror(errno));
-		}
-	}
-
-	return result;
-}
 
 
 #ifdef RIPOLE
@@ -1424,16 +1364,6 @@ int MIME_decode_raw( FFGET_FILE *f, char
 
 		glb.attachment_count += result;
 
-		if (strlen(hinfo->uudec_name))
-		{
-			if (strcasecmp(hinfo->uudec_name,"winmail.dat")==0)
-			{
-				if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_raw:DEBUG: Decoding TNEF format\n",FL);
-				snprintf(hinfo->filename, 128, "%s", hinfo->uudec_name);
-				MIME_decode_TNEF( unpackdir, hinfo, keep);
-			}
-			else LOGGER_log("%s:%d:MIME_decode_raw:WARNING: hinfo has been clobbered.\n",FL);
-		}
 	}
 
 	if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_raw:DEBUG: End[result = %d]\n",FL,result);
@@ -1620,13 +1550,6 @@ int MIME_decode_text( FFGET_FILE *f, cha
 		if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_text:DEBUG: hinfo = %p\n",FL,hinfo);
 		if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_text:DEBUG: Done. [ UUName = '%s' ]\n",FL,hinfo->uudec_name);
 
-		if (strncasecmp(hinfo->uudec_name,"winmail.dat",11)==0)
-		{
-			if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_text:DEBUG: Decoding TNEF format\n",FL);
-			snprintf(hinfo->filename, 128, "%s", hinfo->uudec_name);
-			MIME_decode_TNEF( unpackdir, hinfo, keep );
-		}
-
 		if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_text:DEBUG: Completed decoding UUencoded data.\n",FL);
 	}
 
@@ -2317,7 +2240,6 @@ int MIME_init( void )
 	UUENCODE_init();	// uuen:coding decoding initialisations
 	FNFILTER_init();	// Filename filtering
 	MDECODE_init();	// ISO filename decoding initialisation
-	TNEF_init();		// TNEF decoder
 
 
 	glb.header_defect_count = 0;
@@ -2342,7 +2264,6 @@ int MIME_init( void )
 
 	glb.decode_qp = 1;
 	glb.decode_b64 = 1;
-	glb.decode_tnef = 1;
 	glb.decode_ole = 1;
 	glb.decode_uu = 1;
 	glb.decode_mht = 1;
@@ -2746,19 +2667,6 @@ int MIME_decode_encoding( FFGET_FILE *f,
 
 
 
-		// If our content-type was TNEF, then we need to decode it 
-		//		using an external decoding engine (see tnef/tnef.c)
-		// Admittingly, this is not the most ideal way of picking out
-		//		TNEF files from our decoded attachments, but, for now
-		//		it'll have to do, besides, it does work fine, without any
-		//		side-effects
-
-		if (hinfo->content_type == _CTYPE_TNEF)
-		{
-			if (MIME_DNORMAL) LOGGER_log("%s:%d:MIME_decode_encoding:DEBUG: Decoding TNEF format\n",FL);
-			glb.attachment_count++;
-			MIME_decode_TNEF( unpackdir, hinfo, 0 );
-		} // Decode TNEF
 
 
 
Index: ripmime-1.4.0.10.debian.1/mime.h
===================================================================
--- ripmime-1.4.0.10.debian.1.orig/mime.h
+++ ripmime-1.4.0.10.debian.1/mime.h
@@ -74,7 +74,6 @@ int MIME_set_dumpheaders( int level );
 int MIME_set_headersname( char *fname );
 
 int MIME_set_decode_uudecode( int level );
-int MIME_set_decode_tnef( int level );
 int MIME_set_decode_ole( int level );
 int MIME_set_decode_qp( int level );
 int MIME_set_decode_base64( int level );
Index: ripmime-1.4.0.10.debian.1/ripmime.1
===================================================================
--- ripmime-1.4.0.10.debian.1.orig/ripmime.1
+++ ripmime-1.4.0.10.debian.1/ripmime.1
@@ -15,7 +15,7 @@ ripMIME \-i <mime file> \-d <directory>
 .br 
 [\-\-unique_names[\-\-prefix|\-\-postfix|\-\-infix]] [\-\-mailbox]
 .br 
-[\-\-no\-tnef] [\-\-no\-quotedprintable] [\-\-no\-uudecode] [\-\-no\-ole] [\-\-no\-doublecr] [\-\-no\-mht]
+[\-\-no\-quotedprintable] [\-\-no\-uudecode] [\-\-no\-ole] [\-\-no\-doublecr] [\-\-no\-mht]
 .br 
 [\-\-disable\-qmail\-bounce] [\-\-recursion\-max <level>]
 .br 
@@ -107,9 +107,6 @@ Produces detailed information about the
 
 .SS "Attachment type decoding switches"
 .TP 
-\-\-no\-tnef
-Turn off TNEF/winmail.dat decoding
-.TP 
 \-\-no\-ole
 Turn off OLE decoding
 .TP 
@@ -130,7 +127,8 @@ Turns off ripMIME's look\-ahead searchin
 .TP 
 \-\-no\-multiple\-filenames
 Turns off the behaviour of handling multiple filename occurances in a single MIME header. Normally ripMIME will generate a hard link for each additional filename beyond the original attachment filename detected.
-
+.TP
+Note that this Debian version does not include the \-\-no\-tnef switch.  The tnef package may be useful as an alternative.
 .SS Auxillary parameters
 .TP 
 \-\-buildcodes
@@ -166,4 +164,5 @@ For mailpacks which do not appear to dec
 .BR altermime (1),
 .BR inflex (1),
 .BR ripole (1),
-.BR opentnef (1)
+.BR opentnef (1),
+.BR tnef (1)
Index: ripmime-1.4.0.10.debian.1/ripmime.c
===================================================================
--- ripmime-1.4.0.10.debian.1.orig/ripmime.c
+++ ripmime-1.4.0.10.debian.1/ripmime.c
@@ -58,7 +58,7 @@ char help[] = "ripMIME -i <mime file> -d
 	"[-p prefix] [-e [header file]] [-vVh] [--version]"
 	"[--no_nameless] [--unique_names [--prefix|--postfix|--infix]]"
 	"[--paranoid] [--mailbox] [--formdata] [--debug]"
-	"[--no-tnef] [--no-quotedprintable] [--no-uudecode]\n"
+	"[--no-quotedprintable] [--no-uudecode]\n"
 	"Options available :\n"
 	"-i : Input MIME encoded file (use '-' to input from STDIN)\n"
 	"\tIf <mime file> is a directory, it will be recursed\n"
@@ -90,7 +90,6 @@ char help[] = "ripMIME -i <mime file> -d
 	"--mailbox : Process mailbox file\n"
 	"--formdata : Process as form data (from HTML form etc)\n"
 	"\n"
-	"--no-tnef : Turn off TNEF/winmail.dat decoding\n"
 	"--no-ole : Turn off OLE decoding\n"
 	"--no-uudecode : Turns off the facility of detecting UUencoded attachments in emails\n"
 	"--no-quotedprintable : Turns off the facility of decoding QuotedPrintable data\n"
@@ -404,10 +403,6 @@ int RIPMIME_parse_parameters (struct RIP
 						{
 							MIME_set_decode_uudecode(0);
 						}
-						else if (strncmp (&(argv[i][2]), "no-tnef", 7) == 0)
-						{
-							MIME_set_decode_tnef (0);
-						}
 						else if (strncmp (&(argv[i][2]), "no-ole", 6) == 0)
 						{
 							MIME_set_decode_ole(0);
