Tuesday, April 21, 2009

Email from scripts and jobs sent as attachment.bin

On Fedora, output from scripts such as /etc/rc.local and cron jobs are encoded and attached as attachment.bin even if they seemingly are plain text.

The problem is with carriage returns. I tried using "dos2unix" but that may not remove them all. If that happens put this into the pipeline

command | tr -d '\r' | mail -s .....

No comments:

Post a Comment