Mailinglist Archive: opensuse (4656 mails)

< Previous Next >
Re: [opensuse] cron job email attachment.bin
  • From: Dave Howorth <dhoworth@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 30 Jan 2007 11:18:17 +0000
  • Message-id: <45BF2979.1050804@xxxxxxxxxxxxxxxxx>
Sandy Drobic wrote:
> Dave Howorth wrote:
>> I've attached a complete message. I can only see 7-bit characters and
>> the only control characters I can see are TAB and NL. I really hope you
>> can see something else, because I'm going mad!
> I can't see anything though it doesn't mean there wasn't anything in it
> befor you decided to attach it. For example, in you mail there are not
> tabs any more, they are replaced with spaces.

I'm subscribed to this list at home as well, and the file that arrived
there still had the tabs, so I suspect it did when it arrived at your
site too :P The only place they occur is in the Received header lines.

> 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.

As well as the principle, I want to eliminate a potential bug. This was
working fine for a long time and has suddenly broken, apparently of its
own accord. So I want to find out what has really changed in case it is
having some other undesirable effect.

> Someone more savvy might see a way, but at least I can't tell you how
> cron should be able to control, what kind of characters the called
> programs write to standard out. Though I strongly suspect that it is
> simply not possible.

I've looked at the source of nail now and am pretty convinced that it's
not to blame. And I agree with you that it doesn't seem like cron should
be held responsible.

Carlos E. R. wrote:
> 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
> (<>), which seems to be the
> new name or version of "nail".

I found the history <>
fascinating. Thanks!

> Perhaps the OP could try updating it, to see if it behaves
> differently.

Thanks for the suggestion, but I think that would just introduce another
variable into a situation that already has enough. I prefer to
investigate the current nail and the actual data files.

> | (/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.

/usr/lib/cron/run-crons uses temporary files to cache the output from
the scripts that it runs. I've hacked it so it doesn't delete them
afterwards. Tomorrow morning, I should be able to see exactly what was
produced by the scripts before it gets mangled by the mail system.

Thanks, Sandy & Carlos.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >