Philippe, if you're running this in a user crontab, ignore the indented stuff.
   If this is in /private/etc/crontab, then you are asking cron to have the
   user perl execute the command -e
   And that will produce an error, which will pass through sendmail as
   Sander points out.

You need to be sure that something good happens when you--as the user for
whom cron is executing the task-- echo Test | mail -s "some subject" root
   (or perhaps the user whose user crontab is being dealt with in place of
root).

As Mac OS X is shipped, there is a group write permission on /  .  sendmail
annoyingly but wisely doesn't like that, since, obviously / is in the path
to sendmail's configuration file.
sudo chmod g-w /
will deal with that (each Mac OS X update so far has put the group write
back onto /).

Then, you'll get a different error if the significant username is root:
Apple shipped root with a .forward file containing
>/dev/null
This does achieve discarding the message...it also puts a complaint into
system.log about the >.

I've changed my Mac OS X so that mail to root is shipped off to an ISP
account (full time connection makes that feasible).

  --John


At 7:38 -0700 5/21/2001, Sandor W. Sklar wrote:
>At 4:37 PM +0200 5/21/01, Philippe de Rochambeau wrote:
>>Hello,
>>
>>has anyone ever encountered a conflict between Perl 5.6.0 on MacOSX and cron?
>>
>>whenever I do crons such as
>>
>>0     3       *       *       * perl -e 'open(fh,"file.txt") or
>>die; print fh "Hello"; close(fh)'
>>
>>I get an error message in system.log stating that sendmail.cf has group
>>rights on it, etc. etc.
>
>on all unix systems that I am familiar with, unless you've redirected
>STDOUT/ERR for the cron job, any output is mailed to the user who
>owns the cron job.  Since sendmail, in its out-of-the-box
>configuration on Mac OS X has some issues, that is why you are
>getting the error message.
>
>-s-
>
>>I do not really see what sendmail.cf has to do with with Perl,
>>especially when I do not use sendmail commands within my Perl scripts,
>>as shown above. Perhaps there is some kind of conflict between Perl and
>>the sendmail file which Communigate Pro creates during the
>>installation process.
>
>
>--
>sandor w. sklar
>unix systems administrator
>stanford university itss-css

-- 
John Baxter   [EMAIL PROTECTED]      Port Ludlow, WA, USA

Reply via email to