Unix Technical Forum

Trouble with crontab and MAILTO=

This is a discussion on Trouble with crontab and MAILTO= within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Sybren Stuvel scratched on the wall: > Which files are you checking for log entries btw? > Hi, Don't ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-21-2008, 08:22 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Sybren Stuvel scratched on the wall:

> Which files are you checking for log entries btw?
>


Hi, Don't understand ... read the logs with gnome-system-log. It
checks /var/log/messages, and I think uses /etc/syslog.conf by default.
But, looking in that folder (/var/log/) there a *several* files. Which
suggests that A) mailx isn't receiving mail in /var/mail to "cmo" and
B) gnome-system-log isn't showing everything. Is that what you mean?

Gotta go back to work - CUL.
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-21-2008, 08:22 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

oldNbald enlightened us with:
> Hi, Don't understand ... read the logs with gnome-system-log. It
> checks /var/log/messages


Which is the answer to my question. Apparently, you understand more
than you think ;-)

> and I think uses /etc/syslog.conf by default. But, looking in that
> folder (/var/log/) there a *several* files. Which suggests that A)
> mailx isn't receiving mail in /var/mail to "cmo" and B)
> gnome-system-log isn't showing everything. Is that what you mean?


The log entries should be in /var/log/messages. Just use 'less' or
'tail -f' or something to read them directly.

If you're in doubt about which files cron logs to, just do

grep -ri cron /var/log/*

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-21-2008, 08:23 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Sybren Stuvel scratched on the wall:

> Which is the answer to my question. Apparently, you understand more
> than you think ;-)



Well, that's a switch ! <g>

> The log entries should be in /var/log/messages. Just use 'less' or
> 'tail -f' or something to read them directly.


Here's an item which causes curiosity, the path is /var/log ...
no /messages. Unless, you mean there should be
some /.../messages.*.bz2, and others like mail.*bz2. Here's what else
is interesting; there are mail.err.*.bz2. Of which, these two read:

mail.err.0
Oct 21 03:14:48 codybeau sSMTP[9839]: 573 root@_HOSTNAME_ failed to
route the address

and

mail.err.1
Oct 19 17:00:01 codybeau sSMTP[11320]: 573 root@_HOSTNAME_ failed to
route the address
Oct 20 03:14:40 codybeau sSMTP[8940]: 573 root@_HOSTNAME_ failed to
route the address

But this "domain" is pseudo and I wanted, even expected, cron to send
MAILTO= locally.
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-21-2008, 08:23 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

oldNbald enlightened us with:
> Here's an item which causes curiosity, the path is /var/log ... no
> /messages. Unless, you mean there should be some
> /.../messages.*.bz2, and others like mail.*bz2.


Give us the output of 'ls -lR /var/log' please.

> mail.err.0 Oct 21 03:14:48 codybeau sSMTP[9839]: 573 root@_HOSTNAME_
> failed to route the address


There you go. You didn't configure your ssmtp correctly.

> But this "domain" is pseudo and I wanted, even expected, cron to
> send MAILTO= locally.


Never expect anything ;-)

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-21-2008, 08:23 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Sybren Stuvel scratched on the wall:

> Give us the output of 'ls -lR /var/log' please.


Here you go:

--------begin------
codybeau root # ls -lR /var/log
/var/log:
total 3180
-rw-r--r-- 1 root root 42046 Oct 22 11:57 Xorg.0.log
-rw-r--r-- 1 root root 25931 Oct 20 23:40 Xorg.0.log.old
-rw-r--r-- 1 root root 2377 Sep 23 23:40 Xorg.20.log
-rw-r--r-- 1 root root 24518 Aug 27 12:27 Xorg.20.log.old
-rw-r--r-- 1 root root 1120 Aug 10 01:01 Xorg.8.log
-rw-r--r-- 1 root root 22003 Aug 10 01:01 Xorg.8.log.old
-rw-r----- 1 root adm 495 Oct 22 11:57 auth.log
-rw-r----- 1 root adm 3228 Oct 21 22:27 auth.log.0
-rw-r----- 1 root adm 894 Oct 21 00:23 auth.log.1.bz2
-rw-r----- 1 root adm 471 Oct 19 22:10 auth.log.2.bz2
-rw-r----- 1 root adm 385 Oct 18 21:56 auth.log.3.bz2
-rw-r----- 1 root adm 518 Oct 17 22:13 auth.log.4.bz2
-rw-r----- 1 root adm 388 Oct 16 18:46 auth.log.5.bz2
-rw-r----- 1 root adm 253 Oct 15 22:16 auth.log.6.bz2
drwxr-xr-x 2 root root 4096 Aug 9 17:19 cups
-rw-r----- 1 root adm 0 Oct 22 03:13 daemon.log
-rw-r----- 1 root adm 0 Oct 21 03:16 daemon.log.0
-rw-r----- 1 root adm 927 Oct 20 23:47 daemon.log.1.bz2
-rw-r----- 1 root adm 566 Oct 19 22:06 daemon.log.2.bz2
-rw-r----- 1 root adm 290 Oct 18 18:37 daemon.log.3.bz2
-rw-r----- 1 root adm 644 Oct 17 22:00 daemon.log.4.bz2
-rw-r----- 1 root adm 524 Oct 16 17:27 daemon.log.5.bz2
-rw-r----- 1 root adm 127 Oct 15 18:10 daemon.log.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 debug
-rw-r----- 1 root adm 0 Oct 21 03:16 debug.0
-rw-r----- 1 root adm 923 Oct 20 23:47 debug.1.bz2
-rw-r----- 1 root adm 697 Oct 19 22:06 debug.2.bz2
-rw-r----- 1 root adm 601 Oct 18 18:37 debug.3.bz2
-rw-r----- 1 root adm 832 Oct 17 22:00 debug.4.bz2
-rw-r----- 1 root adm 918 Oct 16 17:27 debug.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 debug.6.bz2
-rw-rw---- 1 portage portage 573877 Oct 21 22:26 emerge.log
-rw-r--r-- 1 root root 154978 Sep 29 20:16 genkernel.log
-rw-r----- 1 root adm 0 Oct 22 03:13 imapd.log
-rw-r----- 1 root adm 0 Oct 21 03:16 imapd.log.0
-rw-r----- 1 root adm 14 Oct 20 03:15 imapd.log.1.bz2
-rw-r----- 1 root adm 14 Oct 19 03:16 imapd.log.2.bz2
-rw-r----- 1 root adm 14 Oct 18 03:13 imapd.log.3.bz2
-rw-r----- 1 root adm 14 Oct 17 03:15 imapd.log.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 imapd.log.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 imapd.log.6.bz2
-rw-r----- 1 root adm 558 Oct 22 11:55 kern.log
-rw-r----- 1 root adm 3348 Oct 21 22:27 kern.log.0
-rw-r----- 1 root adm 12158 Oct 21 00:23 kern.log.1.bz2
-rw-r----- 1 root adm 7625 Oct 19 22:10 kern.log.2.bz2
-rw-r----- 1 root adm 5948 Oct 18 21:56 kern.log.3.bz2
-rw-r----- 1 root adm 10202 Oct 17 22:14 kern.log.4.bz2
-rw-r----- 1 root adm 6100 Oct 16 17:27 kern.log.5.bz2
-rw-r----- 1 root adm 256 Oct 15 22:15 kern.log.6.bz2
-rw-r--r-- 1 root root 292876 Oct 22 11:55 lastlog
-rw-r----- 1 root adm 0 Oct 22 03:13 lpr.log
-rw-r----- 1 root adm 0 Oct 21 03:16 lpr.log.0
-rw-r----- 1 root adm 14 Oct 20 03:15 lpr.log.1.bz2
-rw-r----- 1 root adm 14 Oct 19 03:16 lpr.log.2.bz2
-rw-r----- 1 root adm 14 Oct 18 03:13 lpr.log.3.bz2
-rw-r----- 1 root adm 14 Oct 17 03:15 lpr.log.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 lpr.log.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 lpr.log.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 mail.err
-rw-r----- 1 root adm 86 Oct 22 03:12 mail.err.0
-rw-r----- 1 root adm 125 Oct 21 03:14 mail.err.1.bz2
-rw-r----- 1 root adm 158 Oct 20 03:14 mail.err.2.bz2
-rw-r----- 1 root adm 125 Oct 19 03:14 mail.err.3.bz2
-rw-r----- 1 root adm 124 Oct 18 03:12 mail.err.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 mail.err.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 mail.err.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 mail.info
-rw-r----- 1 root adm 86 Oct 22 03:12 mail.info.0
-rw-r----- 1 root adm 125 Oct 21 03:14 mail.info.1.bz2
-rw-r----- 1 root adm 158 Oct 20 03:14 mail.info.2.bz2
-rw-r----- 1 root adm 125 Oct 19 03:14 mail.info.3.bz2
-rw-r----- 1 root adm 124 Oct 18 03:12 mail.info.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 mail.info.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 mail.info.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 mail.log
-rw-r----- 1 root adm 86 Oct 22 03:12 mail.log.0
-rw-r----- 1 root adm 125 Oct 21 03:14 mail.log.1.bz2
-rw-r----- 1 root adm 158 Oct 20 03:14 mail.log.2.bz2
-rw-r----- 1 root adm 125 Oct 19 03:14 mail.log.3.bz2
-rw-r----- 1 root adm 124 Oct 18 03:12 mail.log.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 mail.log.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 mail.log.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 mail.warn
-rw-r----- 1 root adm 86 Oct 22 03:12 mail.warn.0
-rw-r----- 1 root adm 125 Oct 21 03:14 mail.warn.1.bz2
-rw-r----- 1 root adm 158 Oct 20 03:14 mail.warn.2.bz2
-rw-r----- 1 root adm 125 Oct 19 03:14 mail.warn.3.bz2
-rw-r----- 1 root adm 124 Oct 18 03:12 mail.warn.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 mail.warn.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 mail.warn.6.bz2
-rw-r----- 1 root adm 2991 Oct 22 11:55 messages
-rw-r----- 1 root adm 13234 Oct 21 22:27 messages.0
-rw-r----- 1 root adm 12829 Oct 21 00:23 messages.1.bz2
-rw-r----- 1 root adm 5520 Oct 16 17:27 messages.1.gz
-rw-r----- 1 root adm 8049 Oct 19 22:10 messages.2.bz2
-rw-r----- 1 root adm 5422 Oct 9 19:47 messages.2.gz
-rw-r----- 1 root adm 6281 Oct 18 21:56 messages.3.bz2
-rw-r----- 1 root adm 7743 Oct 2 22:59 messages.3.gz
-rw-r----- 1 root adm 10585 Oct 17 22:14 messages.4.bz2
-rw-r----- 1 root adm 6038 Sep 26 19:12 messages.4.gz
-rw-r----- 1 root adm 14 Oct 17 03:10 messages.5.bz2
-rw-r----- 1 root adm 951 Oct 16 01:47 messages.6.bz2
drwxr-xr-x 2 root root 4096 Aug 9 13:59 news
-rw-r--r-- 1 root root 21260 Oct 20 23:52 ntp.log
-rw-r----- 1 root adm 0 Oct 22 03:13 ppp.log
-rw-r----- 1 root adm 0 Oct 21 03:16 ppp.log.0
-rw-r----- 1 root adm 14 Oct 20 03:15 ppp.log.1.bz2
-rw-r----- 1 root adm 14 Oct 19 03:16 ppp.log.2.bz2
-rw-r----- 1 root adm 14 Oct 18 03:13 ppp.log.3.bz2
-rw-r----- 1 root adm 14 Oct 17 03:15 ppp.log.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 ppp.log.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 ppp.log.6.bz2
-rw-r--r-- 1 root root 869935 Oct 10 10:23 scrollkeeper.log
-rw-r----- 1 root adm 9259 Oct 22 11:55 syslog
-rw-r----- 1 root adm 30697 Oct 22 03:12 syslog.0
-rw-r----- 1 root adm 15628 Oct 21 03:14 syslog.1.bz2
-rw-r----- 1 root adm 10114 Oct 20 03:14 syslog.2.bz2
-rw-r----- 1 root adm 8007 Oct 19 03:14 syslog.3.bz2
-rw-r----- 1 root adm 12719 Oct 18 03:12 syslog.4.bz2
-rw-r----- 1 root adm 7922 Oct 17 03:10 syslog.5.bz2
-rw-r----- 1 root adm 1965 Oct 16 03:10 syslog.6.bz2
-rw-r----- 1 root adm 2384 Oct 22 11:55 user.log
-rw-r----- 1 root adm 9837 Oct 21 22:27 user.log.0
-rw-r----- 1 root adm 1391 Oct 21 00:23 user.log.1.bz2
-rw-r----- 1 root adm 926 Oct 19 22:10 user.log.2.bz2
-rw-r----- 1 root adm 837 Oct 18 21:56 user.log.3.bz2
-rw-r----- 1 root adm 924 Oct 17 22:13 user.log.4.bz2
-rw-r----- 1 root adm 438 Oct 16 09:20 user.log.5.bz2
-rw-r----- 1 root adm 779 Oct 16 01:47 user.log.6.bz2
-rw-r----- 1 root adm 0 Oct 22 03:13 uucp.log
-rw-r----- 1 root adm 0 Oct 21 03:16 uucp.log.0
-rw-r----- 1 root adm 14 Oct 20 03:15 uucp.log.1.bz2
-rw-r----- 1 root adm 14 Oct 19 03:16 uucp.log.2.bz2
-rw-r----- 1 root adm 14 Oct 18 03:13 uucp.log.3.bz2
-rw-r----- 1 root adm 14 Oct 17 03:15 uucp.log.4.bz2
-rw-r----- 1 root adm 14 Oct 16 03:15 uucp.log.5.bz2
-rw-r----- 1 root adm 14 Oct 15 03:15 uucp.log.6.bz2
-rw-rw-r-- 1 root utmp 796800 Oct 22 11:57 wtmp
-rw-rw-r-- 1 root utmp 31987 Sep 30 22:17 wtmp.1.gz
-rw-r--r-- 1 root root 3992 Oct 20 21:12 xdm.log

/var/log/cups:
total 0

/var/log/news:
total 0
-rw-r--r-- 1 root root 0 Aug 9 13:59 news.crit
-rw-r--r-- 1 root root 0 Aug 9 13:59 news.err
-rw-r--r-- 1 root root 0 Aug 9 13:59 news.notice

---------end-------

>
>> mail.err.0 Oct 21 03:14:48 codybeau sSMTP[9839]: 573 root@_HOSTNAME_
>> failed to route the address

>
> There you go. You didn't configure your ssmtp correctly.



Didn't comfigure it? I didn't config anything at all ! <g>
What should I have done?

>
>> But this "domain" is pseudo and I wanted, even expected, cron to
>> send MAILTO= locally.

>
> Never expect anything ;-)


Sorta like "assume", huh?

Hey, thanks again for helping me.
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-21-2008, 08:24 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

oldNbald enlightened us with:
> codybeau root # ls -lR /var/log


Check those:

> -rw-r----- 1 root adm 2991 Oct 22 11:55 messages
> -rw-r----- 1 root adm 13234 Oct 21 22:27 messages.0
> -rw-r----- 1 root adm 9259 Oct 22 11:55 syslog
> -rw-r----- 1 root adm 30697 Oct 22 03:12 syslog.0


> Didn't comfigure [ssmtp]? I didn't config anything at all ! <g>


LOL

> What should I have done?


Edit /etc/ssmtp/ssmtp.conf

> Hey, thanks again for helping me.


NP!

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 02-21-2008, 08:24 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Sybren Stuvel scratched on the wall:

> oldNbald enlightened us with:
>> codybeau root # ls -lR /var/log

>
> Check those:
>
>> -rw-r----- 1 root adm 2991 Oct 22 11:55 messages
>> -rw-r----- 1 root adm 13234 Oct 21 22:27 messages.0
>> -rw-r----- 1 root adm 9259 Oct 22 11:55 syslog
>> -rw-r----- 1 root adm 30697 Oct 22 03:12 syslog.0


Sorry, I don't understand ... check these for what? Should I mess with
the permissions, or add my user to adm, or something else?


>
> Edit /etc/ssmtp/ssmtp.conf
>


Sybren, forgive my colossal ignorance - am new to this subject, but edit
in what way? Or did you intend I read about it (planning to this
weekend) and edit as needed?

Happily in your debt,
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 02-21-2008, 08:24 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

oldNbald enlightened us with:
> Sorry, I don't understand ... check these for what? Should I mess
> with the permissions, or add my user to adm, or something else?


No, read them. Use less, vim, tail, whatever you want.

> Sybren, forgive my colossal ignorance - am new to this subject, but
> edit in what way?


Open it in a text editor like vim, read the contents. It's quite
self-explaining. Also check /usr/share/doc/ssmtp-* and the manual
pages. In other words: do some research.

> Or did you intend I read about it (planning to this weekend) and
> edit as needed?


Yep!

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 02-21-2008, 08:25 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Sybren Stuvel scratched on the wall:

>
> No, read them. Use less, vim, tail, whatever you want.
>


Okay, I did - nothing new: a broken pipe, dmesg stuff and bad mail
delivery. That sort of thing.

[...]
> In other words: do some research.


Herein lies one of the _many_ things about Linux, and Gentoo in
particular, I greatly enjoy: I can research and *control* or fix things
a Windows user has /no/ means, or control of, to do in any depth -
regardless of their need.

Let you know how it goes ... may take some time as it's the weekend and
I've the "domestic" things to get done <g>. Plus, I'll be learning
something heretofore I've never studied - and I love it !

Gratis,
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 02-21-2008, 08:25 AM
oldNbald
 
Posts: n/a
Default Re: Trouble with crontab and MAILTO=

Oh yeah, I've another problem to research *before* I etc-update. I
always make a backup of /etc before using the update. When I ran the
update of 7 .*_cfg files the net was lost. I've got to learn why and
what to do. Have a lot on the plate this weekend, huh?
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com