You are not logged in.
Pages: 1
hi,
i noticed this in my /var/log/crond and can't figure out why its even started.
18-Feb-2009 11:01 FILE /var/spool/cron/root USER root pid 7942 cmd /usr/sbin/run-cron /etc/cron.hourly
18-Feb-2009 11:01 unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
i didnt install sendmail and in cron.hourly there's just this:
[konni@distance] /etc/cron.hourly$ ls
update
[konni@distance] /etc/cron.hourly$ cat update
#!/bin/sh
/usr/bin/pacman -Sy
any ideas?
Last edited by konni (2009-02-18 10:12:24)
Offline
Maybe you have a hidden file and cron executes that one too?
Offline
nope, nothing there.
created a hidden file just to be sure it gets found
[konni@distance] /etc$ find cron.* -type f
cron.daily/updatedb
cron.daily/logrotate
cron.daily/whatis
cron.daily/shadow
cron.hourly/.hiddentest <- testfile
cron.hourly/update
crontab user
*/5 * * * * /usr/bin/syncmail
which is just a small script running imapfilter and offlineimap - no sendmail in there. and its executed each five minutes, the error occurs every hour.
/usr/bin/syncmail
imapfilter
offlineimap 2&>/dev/null
crontab root
01 * * * * /usr/sbin/run-cron /etc/cron.hourly
02 00 * * * /usr/sbin/run-cron /etc/cron.daily
22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly
42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly
Offline
so the only reason is the pacman -Sy script. but what in there could invoke sendmail??
Offline
it may be trying to send you logs via email, though i have no idea why it would autocreate a cron job to do that if you never provided any info.
personally, i would be inclined to delete (well...move it to a file just in case...) the cronjob and see if any adverse affects crop up down the line. I cant imagine it would...
its hourly, so youll find out soon enough either way
EDIT:
DERP....disregard my advice...i misread this and thought you invoked the sendmail inside the pacman -Sy for whatever reason. not sure how i jumped to that conclusion rereading the thread.
in short, i have no idea why pacman would trigger sendmail (as it runs on the hour, it is throwing the error presumably...)...this is odd to me haha.
Last edited by thisperishedmin (2009-02-18 15:10:41)
Offline
Cron is complaining that there is no sendmail binary to send you the output from the /etc/cron.hourly/update script.
Possible Solutions:
1) Install an MTA (sendmail, postfix, ssmtp etc); or
2) Prevent pacman from generating output:
#!/bin/bash
pacman -Sy > /dev/null
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
so by default the output of a cron job gets sent to me via mail?
Offline
so by default the output of a cron job gets sent to me via mail?
This is correct.
cron(8) man-page:
[...] When executing commands, any output
is mailed to the owner of the crontab (or to the user named in the MAILTO
environment variable in the crontab, if such exists).
Offline
That must be the manpage for vixiecron. The arch package core/dcron doesn't understand the MAILTO environment variable. It just mails any output from a cronjob's stdout and/or stderr to the local user. So you need a smtp agent on your machine, /usr/sbin/sendmail has to link to it, and it has to be capable of handling mail to local users (for example, msmtp cannot handle such mail but esmtp can). If you want to send all cron output to a single email address, perhaps an address@some.other.host instead of a local user, you could look at my package. But if you just want to eliminate the log messages, it's enough to add
> /dev/null 2>&1
to the end of each crontab line which might produce output.
(I realize this is an old thread, and probably already solved to the original poster's satisfaction. I'm just doing a sweep and answering some recent-or-at-least-not-ancient cron-related questions in case someone might find it useful.)
Offline
Pages: 1