-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The Tuesday 2007-01-30 at 11:18 -0000, Dave Howorth wrote:

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

Probably it is just the cron script producing a char that mail doesn't 
like; perhaps it could be a file name.

> 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
> > (<http://heirloom.sourceforge.net/mailx.html>), which seems to be the
> > new name or version of "nail".
> 
> I found the history <http://heirloom.sourceforge.net/mailx_history.html>
> fascinating. Thanks!

It was pointed in this list some days back. I hadn't read that history 
part. Very interesting. Did you notice the last paragraph?

|  Portable scripts should either invoke mail without any options or 
|  should use the standardized mailx interface. In any case, they should 
|  set the MAILRC variable to /dev/null to bypass the user's 
|  configuration. As this variable is present in mailx, but not in Mail, 
|  using Mail for scripts does not work reliably anyway and should be 
|  avoided. (In effect, this means that there is no reliable way to send 
|  mail from a script on many BSD derivatives and Linux distributions. But 
|  that is a fact one has to live with.)



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

Ok.

But, once you have the output file you mention below, you could perhaps 
compile the new version, and without the "make install" phase, try sending 
it and see if there is a difference. Probably not, anyway. Without 
installing it will not replace your system mail; and even if you install 
it, it will go to /usr/local/somewhere, so the original one is not 
disturbed.

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

Good idea!


Another idea.

Perhaps nail doesn't like utf-8. You could view that file as iso, and 
check if there are weird things.

I have a small script, "/usr/local/bin/isoxterm", containing:

  LANG=en_US.ISO-8859-1 LC_ALL=en_US.ISO-8859-1 /usr/bin/xterm -bd blue &

Maybe I could set it as an alias thing, but I havent bothered. The thing 
is, I have a shortcut to launch an xterm in ISO-8859-1 mode, instead of 
the default UTF-8 (with a blue left border to distingish it). You can do 
the same, and view the cron output file with less inside such an xterm to 
see at a glance utf specific chars.

- -- 
Cheers,
       Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFFv0fHtTMYHG2NR9URAvYYAJ9VAYE60f3hRkl04VEoNsSm2ntBRwCdF69Z
zeZKeEfamwnbsmsUBgeVYmw=
=Soi3
-----END PGP SIGNATURE-----

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to