# SLES 10 & cron emails

**URL:** <https://forums.suse.com/t/sles-10-cron-emails/21853>\
**Category:** SLES Configure-Administer\
**Created:** [October 28, 2011, 7:36pm UTC](https://forums.suse.com/t/sles-10-cron-emails/21853 "2011-10-28T19:36:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [October 28, 2011, 7:36pm UTC](https://forums.suse.com/t/sles-10-cron-emails/21853/1 "2011-10-28T19:36:02Z")

</div>

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](http://forums.novell.com/member.php?userid=98994)  
View this thread: [http://forums.novell.com/showthread.php?t=447485](http://forums.novell.com/showthread.php?t=447485)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 28, 2011, 8:13pm UTC](https://forums.suse.com/t/sles-10-cron-emails/21853/2 "2011-10-28T20:13:20Z")

</div>

On Fri, 28 Oct 2011 16:36:02 GMT  
afera [afera@no-mx.forums.novell.com](mailto: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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 28, 2011, 9:16pm UTC](https://forums.suse.com/t/sles-10-cron-emails/21853/3 "2011-10-28T21:16:02Z")

</div>

malcolmlewis;2149846 Wrote:[color=blue]

> On Fri, 28 Oct 2011 16:36:02 GMT  
> afera [afera@no-mx.forums.novell.com](mailto: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](http://forums.novell.com/member.php?userid=98994)  
View this thread: [http://forums.novell.com/showthread.php?t=447485](http://forums.novell.com/showthread.php?t=447485)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 29, 2011, 11:25am UTC](https://forums.suse.com/t/sles-10-cron-emails/21853/4 "2011-10-29T11:25:04Z")

</div>

- 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
