리눅스 서버에 대해서/솔라리스(UNIX) 관련
메일 전송시 att00001.bin 이 딸려 들러갈때 처리법
중년 플머 김씨
2013. 4. 1. 10:14
로그를 취합해서 메일을 그냥 전송하는 스크립트를 짜서 테스트를 할때는 이상없이
문자가 가지만, 간혹 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
|
| |
| 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
| answered Oct 25 '11 at 13:26 |
|
| |