AT00003.bin attachment is received from mailx command.

Hi Team,

I am sending a mail from Linux box as shown below.

cat sample.log | mailx -s "Testing" abc.com

But instead of receiving the content of sample.log in the mail i got an attachment with name AT00001.bin.

After looking into the contents of log file i found that there are some extra characters which was the resson this attachment.

Log file contents :

2014/11/23-00:04:18: Calling abc.ksh ...
^[[H^[[JLink environment initialized for instance...

Can anyone please help me to understanding the concept for this kind of behaviour of mailx command.

mail accepts only *nix text files as text. Any control char in the file, even the <CR> windows line terminator, makes it recognize and send it as a binary file. Not sure what the ECMA-48 CSI sequences in your log file mean, though.