[Mimedefang] Re: Code to remove winmail.dat files and replace themwiththe attachments.

Stewart mimedefang at f8.com.au
Sun Aug 14 22:24:42 EDT 2005

On 12/08/2005, at 10:27 AM, Stewart wrote:

> I applied the patch the other day using the debian package of ytnef  
> (cuz i'm lame and prefer to use apt-get wherever possible :)
> Tested it a bit and it seemed fine but all sorts of things went  
> awry the next day - attachments went missing, and/or turned up on  
> the wrong email messages! I was totally confused as to what might  
> be going on until one user rang me and said the person sitting next  
> to her sent her an email and it collected someone else's attachment  
> on the way. Ooops, said i, and rapidly put back the backup of  
> mimedefang-filter.
> Upon further reflection i think my problem might be the line  
> calling ytnef - perhaps stupidly i just altered the path, but  
> didn't think about the calling parameters so it says
> @new_files = `/usr/bin/ytnef -f Work $path`;
> now if i'm reading ytnef help output correctly, i think that should be
> @new_files = `/usr/bin/ytnef -f . $path`;
> can someone confirm/deny this for me before i go and mess things up  
> again? :)

to answer my own question - i tested the second version on the  
weekend and it all seemed to work fine. Now come monday morning and  
people are reporting phantom attachments again (four 0-byte PDFs in  
the last one reported) Is it that the attachments are being processed  
in the same directory and under load some messages are being  
processed at the same time as each other out of the same directory?  
That's about the only explanation i can think of for the behaviour  
i'm seeing - although now i think of it, doesn't MD create a temp dir  
under /var/spool/MIMEDefang for each message it's processing?

Also i'm wondering about the '-f Work $path' of the original line as  
'Work' doesn't seem to be a perl variable or a parameter that (my  
version of) ytnef seems to know about.

well anyway being a non-perl guru i've put my md-filter up at http:// 
www.f8.com.au/mimedefang-filter in hope someone can have a look at it  
and tell me what i've done wrong? appreciated..


PS fwiw it's debian testing/unstable kernel 2.4.30 running the dpkgs  
of mimedefang 2.51-2; perl 5.8.4-3; sendmail 8.13.1-16; ytnef 2.6-1...

More information about the MIMEDefang mailing list