HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

File content

 
Son dam bi
Advisor

File content

I have a attachment text file that send from unix to exchange server via mail.pl , I read this attachment file in outlook express and found that the data in the file have changed ( different from the original file that I read in unix server ) , I also tried if I gzip this attachment file in unix server , then send it out ( via the same method ) , it do not have the problem , the file is exactly what is it in unix , can advise what is the reason of the problem , how to solve it ? thx
8 REPLIES
Patrick Wallek
Honored Contributor

Re: File content

>> found that the data in the file have changed

How? How is the data different when viewed with outlook?
Son dam bi
Advisor

Re: File content

thx reply ,

Yes , the format and decimal is changed .

Thx
Son dam bi
Advisor

Re: File content

I tried to use the below command to convert it , it seems complete to convert it , but I try to read this file in mail , but still have problem .


#unix2dos my_file.txt
unix2dos my_file.txt
unix2dos: converting file my_file.txt to DOS format ...


In short , is it the problem of binary / acsii format , if the file changed to binary before send out , will it solve the problem ? if yes , how to do it ? thx

Re: File content

>the format and decimal is changed.

What do you mean by "decimal", a period "."?

>#unix2dos my_file.txt

Do you mean ux2dos(1)?

>is it the problem of binary/acsii format, if the file changed to binary before send out,

This makes sense for ftp. For mail, you may have to encode it.

>how to do it?

Unix doesn't have this property for a file. It is whatever the mail client/server thinks.
F Verschuren
Esteemed Contributor

Re: File content

please try the folowing mail methode:
uuencode /???/????/?????.txt ??????.txt | sendmail .your.name@yourdomain.???
this will not change the file.
Son dam bi
Advisor

Re: File content

thx reply ,

I am not too understand the function of uuencode , but even it works for my case , it will change my current sending mail method , I am not prefer to use it .

except this method , I am wonder if I can change the attachment file to binary before send ( like ux2dos ) , can this method solve the problem ? thx
Son dam bi
Advisor

Re: File content

thx

if the file is transfered via ftp , the file is normal , the problem only happens when transfered by mail , what is the reason of the problem ? thx
Steven Schweda
Honored Contributor

Re: File content

> >> found that the data in the file have
> >> changed
>
> How? How is the data different when viewed
> with outlook?

Will we ever see an answer to that question?

> >the format and decimal is changed.
>
> What do you mean by "decimal", a period "."?

Or to that one?

> if the file is transfered via ftp , the
> file is normal ,

Saying "transfered via ftp" omits some
potentially useful details. Which system was
the FTP client, which the server? ASCII or
binary FTP? (Note that ASCII FTP should
remove any need for "u[ni]x2dos" on a text
file.)

> the problem only happens when transfered
> by mail ,

Which procedure was never well explained,
either.

> what is the reason of the problem ?

If we could get a clear explanation of what
you did, and what happened to the data in the
file, then it might be easier to provide an
explanation. (Or, you could wait for a
helpful psychic, who can see what you're
doing and seeing without any help from you.)