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

Sendmail problem.

 
SOLVED
Go to solution
Clark Hayden
Advisor

Sendmail problem.

Hi.

We use sendmail to distribute e-mails from out VMS server (Itanium) along with attachments. The problem that I am sitting with is that we create excel files, in an external process, which are then copied to VMS via an FTP image transfer. The files are fine at this point and I have verified this by doing a second FTP image transfer to a windows directory and opening the file using excel. However, when the excel file is sent via sendmail then the resultant attachment is corrupted.

Any idea what could be causing this and how to resolve the problem?

Thanks.
Hayden.
9 REPLIES 9
The Brit
Honored Contributor

Re: Sendmail problem.

I have no expertise in this area, however did you consider the MIME settings on your mailserver. It may be mishandling the attachments.

Dave
Hoff
Honored Contributor

Re: Sendmail problem.

Ok, I'm going to assume that this referenced "sendmail" is the sendmail.com DCL procedure (from Jerry Alan Braga, and available via dcl.openvms.org), and not a port of the sendmail.com folks' Unix SMTP server environment.

You're going to have to start looking at the MIME sources, and seeing where this is going off the rails. Could be within sendmail. Could be the MIME encoding logic. Could be the particular MIME commands specified. Could be the SMTP server in whatever VMS TCP/IP stack is involved. Could even be in the Windows mail client that's garbling this.

But in any case, we're going to have to know rather more about the environment (background on the version, IP stack, tools used, particularly the MIME-building sequence, etc) and around the results. And in most any imaginable likelihood, this case will only be resolved by digging through the MIME message source and through the sources of the sendmail.com DCL command procedure.

I'd generally recommend moving the files and related details the other way; get the files to a mail server running on Unix or Linux, or get the files over to Exchange Server on Windows. The VMS SMTP environment is old, limited, and (depending on your UX perspective) somewhere between arcane and buggy. VMS just isn't a modern SMTP.
Steven Schweda
Honored Contributor

Re: Sendmail problem.

> [...] sent via sendmail [...]

Not a very detailed description of what you
did, or of what you used to do it (or of what
it does).

> [...] corrupted.

Not a very detailed description of what's
wrong with the data.

You might try using (binary/image) FTP to get
the "corrupted" file back to the VMS system,
where you might be able to learn something by
comparing it with the original.
Robert Gezelter
Honored Contributor

Re: Sendmail problem.

Hayden,

It would be helpful to actually see at what point things are "getting corrupted". Versions and precise sourcing for "sendmail" would also be helpful.

Within the limits of confidentiality, the precise code invoked would be extremely helpful. Confirmation that "sendmail" refers to the package as opposed to sendmail meaning "the mail program" as on *IX would also be clarifying.

- Bob Gezelter, http://www.rlgsc.com
Richard Jordan
Regular Advisor

Re: Sendmail problem.

If this is, as Hoff supposed, Mr. Braga's sendmail.com routine, you need to make sure you have an entry in the MIME$FILETYES.DAT file in the SYS$LOGIN directory for the account doing the work for the file 'type' or suffix.

For example in mine I have an entry for PDF files:

pdf, application/PDF, Base64


so if your files end in (for example) XLS, try adding a line to (or creating) SYS$LOGIN:MIME$FILETYPES.DAT that reads:

xls, application/XLS, Base64

and see if that helps.

Steven Schweda
Honored Contributor

Re: Sendmail problem.

> [...] when the excel file is sent via
> sendmail then the resultant attachment is
> corrupted.

Actually, what you probably know is that the
attachment is bad after the (unspecified)
e-mail client program extracts it. The
reason could be bad MIME encoding of some
sort, or bad extraction of the attachment by
the client. Having some experience with the
VMS MIME utility, I'd guess that, if this
"sendmail" procedure is using it, the problem
would not be found in the e-mail client, but
it might be interesting to send one of the
e-mail messages to a VMS user, and then try
to use the same MIME utility to recover the
attachment on the VMS system, and do a
before-after comparison. The inherent
stupidity of the VMS MAIL program allows one
to use it to examine the details of an e-mail
message (e-mail header, MIME headers, and so
on) which a more competent e-mail client
program is apt to hide.
Bojan Nemec
Honored Contributor
Solution

Re: Sendmail problem.

A small observation on Richards post:

>xls, application/XLS, Base64

should be:

xls, application/vnd.ms-excel, Base64

The application/vnd.ms-excel is the registered MIME type. See
http://www.iana.org/assignments/media-types/application/

Bojan
Clark Hayden
Advisor

Re: Sendmail problem.

Wow. A big thank you to everybody for their replies. Let me give some more detail, as requested.

The sendmail that I refer to is indeed the Braga version of sendmail on VMS. The excel files have already been copied via a binary FTP to the VMS server and have been verified as correct at this point.

I am going to put in a request with our system administrator to check the MIME config file and will let you know if the addition of an xls line resolves the problem.

Once again, thank you to everybody for your feedback.
Hayden.
Clark Hayden
Advisor

Re: Sendmail problem.

Ok, everybody that suggested I add a line to the filetypes.dat file, could you please form an orderly queue. I owe each one of you a wet kiss. Not always a good thing since I'm a middle-aged, over-weight, keyboard jockey.

The addition of the xls line to the filetypes file worked like a charm.

A massive thank you to each of you for all your help.

Hayden.