SLES 10 & cron emails

I receive emails daily with title “cronjob@myserver- daily - OK” but I
do not receive emails from cronjobs that make output.

to check if everything is ok I did two entires in /etc/crontab

*/5 * * * * root echo “test”
*/5 * * * * root echo “test” >> /var/log/test

both entries are executed by cron. The second one adds every five
minutes “test” to the test file in /var/log
however i would expect the first one to send the output to email
specified in MAILTO but it do not.

any idea why ?


afera

afera’s Profile: http://forums.novell.com/member.php?userid=98994
View this thread: http://forums.novell.com/showthread.php?t=447485

On Fri, 28 Oct 2011 16:36:02 GMT
afera afera@no-mx.forums.novell.com wrote:
[color=blue]

I receive emails daily with title “cronjob@myserver- daily - OK” but I
do not receive emails from cronjobs that make output.

to check if everything is ok I did two entires in /etc/crontab

*/5 * * * * root echo “test”
*/5 * * * * root echo “test” >> /var/log/test

both entries are executed by cron. The second one adds every five
minutes “test” to the test file in /var/log
however i would expect the first one to send the output to email
specified in MAILTO but it do not.

any idea why ?

[/color]
Hi
Make sure you have the full path to any applications as cron doesn’t
know any environment like /bin /usr/bin etc.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 14:00, 4 users, load average: 0.00, 0.04, 0.05
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

malcolmlewis;2149846 Wrote:[color=blue]

On Fri, 28 Oct 2011 16:36:02 GMT
afera afera@no-mx.forums.novell.com wrote:
[color=green]

I receive emails daily with title “cronjob@myserver- daily - OK” but[/color]
I[color=green]
do not receive emails from cronjobs that make output.

to check if everything is ok I did two entires in /etc/crontab

*/5 * * * * root echo “test”
*/5 * * * * root echo “test” >> /var/log/test

both entries are executed by cron. The second one adds every five
minutes “test” to the test file in /var/log
however i would expect the first one to send the output to email
specified in MAILTO but it do not.

any idea why ?

[/color]
Hi
Make sure you have the full path to any applications as cron doesn’t
know any environment like /bin /usr/bin etc.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 14:00, 4 users, load average: 0.00, 0.04, 0.05
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09[/color]

case solved.

crontab uses sendmail to send mails which is most likely hardcoded into
cron.
emails send by the daily cronjobs uses mail command (what can be found
in /usr/lib/cron/run-crons script)

quite confusing. still cannot understand why suse expect to have mail
server to send simple emails instead of just having email client for
this.
I’ve changed postfix into ssmtp finally which took me time as this is
not available in suse as normal rpm packet…


afera

afera’s Profile: http://forums.novell.com/member.php?userid=98994
View this thread: http://forums.novell.com/showthread.php?t=447485

  • malcolmlewis (Fri, 28 Oct 2011 17:13:20 GMT)[color=blue]

Make sure you have the full path to any applications as cron doesn’t
know any environment like /bin /usr/bin etc.[/color]

??? Of course cron has a default PATH setting. You can even specify your
own in crontab.

Thorsten