Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Bug In MIME.EXE With NULL's?

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

Bug In MIME.EXE With NULL's?


I'm trying to MIME encode a Comma Seperated file to be emailed to a user.

Some of the fields contain NULL characters, encased in quotes.

When MIME hits one of these, it truncates the record including the CRLF record terminator.

It this a bug?

Does anyone have a Perl script that I can use to search files for a NULL and send a warning?

Are there any other utilities available that can MIME encode a file?

Rob.
17 REPLIES
Robert Atkinson
Respected Contributor

Re: Bug In MIME.EXE With NULL's?

I should add, I'm using the command 'MIME> ADD /TEXT' - perhaps this is why it's falling over the NULL?

Rob.
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Bob,

Just tried to mail a txt file with NULL, "NULL" and 'NULL' and it all arrived well (no trunc).

Mime 1.7 on VMS 7.3.

The file is ADDed without any options in mime.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Same test with /text, same result.

Wim
Wim
Volker Halle
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Rob,

confirmed with MIME V1.9 on OpenVMS Alpha V8.2. Maybe you need MIME> ADD/BIN file

Wim,

it's about a binary NULL character - can be created in TPU with Gold 0 Gold 3 (=SPECINS)

Volker.
Robert Atkinson
Respected Contributor

Re: Bug In MIME.EXE With NULL's?

Can't use ADD/BIN, as it comes out as a stream style record (no CRLF record terminator).

Rob.
Volker Halle
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Rob,

ADD

/BINARY

Sets Content-Type to "application/octet-stream" and
Content-Transfer-Encoding to "Base64". This format can
be used to represent an arbitrary binary data stream.

The binary NULL correctly arrives after an ADD/BIN and sending the created MIME mail file through VMSmail locally.

Volker.
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

OK. Bad result on 1.7 too.
But this is what I expect of binary data.

Wim
Wim
Robert Atkinson
Respected Contributor

Re: Bug In MIME.EXE With NULL's?

Is NULL really binary - it's part of the standard ASCII set?

Rob.
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

All binary values are in the ascii set.

May be better to speek of printable.

Why not zip it first ?

Wim
Wim
Joseph Huber_1
Honored Contributor
Solution

Re: Bug In MIME.EXE With NULL's?

If a file may contain "unprintable" characters,
then use Quoted-Printable encoding (why else do You want MIME encode ?):

MIME> add/text/encode=Quoted file

or add a line for the file-extension in
SYS$COMMON:[SYSMGR]MIME$FILETYPES.DAT
specifying
thistyp, text/plain, Quoted-Printable

so that a simple ADD does it for *.thistyp .
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

is NULL binary ?

Every thing in memory (or a file) is binary.
The question here is, TEXT in mail should be
ASCII codes 32-126 only, everything else should be quoted.
http://www.mpp.mpg.de/~huber
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Nice Joseph. It works on 1.7.

WIm
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

MIME$FILETYPES.DAT must be modified after each upgrade ! I would go for the /enc.

Wim
Wim
Robert Atkinson
Respected Contributor

Re: Bug In MIME.EXE With NULL's?

Joseph, likewise, that works perfectly here too.

Many thanks for your help.

Rob.
Joseph Huber_1
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

Wim, are You sure ?
Even if it is replaced by VMS upgrades, don't You have, as a system manager, a separate directory, where all the customized files live ? :-)

http://www.mpp.mpg.de/~huber
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?

It's documented. They say that the file is only replaced when it is modified by HP. Otherwise the file is not in the upgrade kit. So you must re-apply the change (or the next system manager will post the same question over here).

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Bug In MIME.EXE With NULL's?