로그를 취합해서 메일을 그냥 전송하는 스크립트를 짜서 테스트를 할때는 이상없이 

문자가 가지만, 간혹 att00001.bin 으로 본문 텍스트가 씹혀서 가는 경우가 있습니다.


어차피 outlook에서는 이녀석을 누르면 텍스트를 보여주니까 문제는 없지만...


그래도.. 잘못된건 고쳐야 하므로

구글링을 하던중 아래와 같으 것을 발견 하였습니다.


그러니까... 문자열 문제... ?


출처 : http://superuser.com/questions/309530/prevent-nail-from-attaching-my-message-as-a-bin-file



When I pipe a very long change log into nail, I receive a blank email with a .bin attachment namedATT00001..bin in Outlook. The file is 36KB and contains the expected text but double spaced (presumably something to do with line endings). If the messages are brief, this doesn't happen.

How do I prevent Nail from converting my message to an attachment?

User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
share|improve this question

I have had this same problem with the son of nail (heirloom mailx) on a Redhat ES 6.1. The problem in the end boiled down to the file not being an ascii, unix standard file (that is LF-only).

I solved this problem by removing the \r characters from the file before sending the mail.

cat logfile | sed 's/\r//' > logfile.new

share|improve this answer
I've long since moved on from the Outlook environment, but imagined it would be something like this given that MS 
is involved. Thanks. – Matt Joiner Jan 24 at 23:28




저작자 표시 비영리 변경 금지
신고
블로그 이미지

프로그래머 지향자 RosaGigantea

바쁜 일상 생활중의 기억 장소