-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-01-29 at 19:19 +0100, Sandy Drobic wrote:
Dave Howorth wrote:
I don't want to seem ungrateful but I'd rather not do this. It's just papering over the cracks. There's no good reason why cron shouldn't carry on mailing these messages as text exactly as it has done for ages. I want to find the cause of the current problem, not just mask its effect.
Well, cron uses the system "mail" command, which was changed not long ago to "nail" (perhaps with 9.2, maybe 9.1). I understand that 10.2 has changed again to a new one, mailx (http://heirloom.sourceforge.net/mailx.html), which seems to be the new name or version of "nail". Perhaps the OP could try updating it, to see if it behaves differently.
I see, a man of principles. In that case you might want to investigate the programs that are called in cron. cron does not control what these programs write to standard out, so it is reasonable to assume that some programs will produce output that causes nail to regard the text as not ascii7.
I had the same problem a year ago when I set up cron to update antivir. I finally gave in and ran the output through "tr" to replace the characters causing nail to attach the text as a binary.
I'm starting to understand. yes, I also got emails from cron jobs as attachments and I didn't know why. Now I do. - From another post from the OP: | It's cron. /etc/crontab => /usr/lib/cron/run-crons => etc etc => | /root/bin/cron.daily.local | | (/usr/lib/cron/run-crons is the script that actually create and sends | the mail, I think: | if [ -n "${STATUS}" -o "$SEND_MAIL_ON_NO_ERROR" = true ] ; then | mail ${SEND_TO} -s "${TITLE}" < ${CONTROL_MAIL} | fi | ) So, the text to be mailed is piped to the standard input. If it could be given as a file via command, we could play with the filename extension to change the mime type used by nail. But I don't see how to do that. Perhaps using -q file, but the mail is not ended, it still wants stdin. An alternative would be to use the sendmail binary, old style, instead of nail. Perhaps: sendmail -B 8BITMIME -F root@localhost ${SEND_TO} < ${CONTROL_MAIL} I don't see how to specify the subject, though, unless it is by including it inside the piped text. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFvl/AtTMYHG2NR9URAhkgAJ4wi7HiGmyic/IF28GEUC1hygszYQCdGQ9S iuURS5mpHhwHf+1crV6VJIQ= =ZusP -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org