Discussion:
Cron Mails an root abstellen
(zu alt für eine Antwort)
Aziz Kaminh
2004-06-27 21:00:07 UTC
Permalink
Hallo,
cron sendet nach jeder ausgeführten Aktion in cron.hourly/daily Mails an
root. Da ich ein Backupscript laufen habe bekomme ich eine riesige Mail
mit dem Output an root, was mir über ein Modem zu lange dauert. Kann ich
irgendwo abstellen, das cron Mails an root sendet? danke!
Jan Schampera
2004-06-27 21:10:33 UTC
Permalink
On Sun, 27 Jun 2004 23:00:07 +0200
Post by Aziz Kaminh
Hallo,
cron sendet nach jeder ausgeführten Aktion in cron.hourly/daily Mails
an root. Da ich ein Backupscript laufen habe bekomme ich eine riesige
Mail mit dem Output an root, was mir über ein Modem zu lange dauert.
Kann ich irgendwo abstellen, das cron Mails an root sendet? danke!
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad keine
Docs zur Hand.

Jan
--
"Be liberal in what you accept, and conservative in what you send."
- J. B. Postel, master of the net.
Aziz Kaminh
2004-06-27 21:13:43 UTC
Permalink
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad keine
Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
Sven Hartge
2004-06-27 23:20:33 UTC
Permalink
Post by Aziz Kaminh
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad
keine Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
Dann setze es.


--
Fachbegriffe der Informatik - Einfach erklärt
185: LaTeX
Eine spülmaschienenfeste Seitenbeschreibungssprache. (Cornell
Binder)
Bernd Nawothnig
2004-06-27 23:37:00 UTC
Permalink
Post by Sven Hartge
Post by Aziz Kaminh
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad
keine Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
Dann setze es.
Ja, aber auf den Leerstring:

If MAILTO is defined but empty (MAILTO=""), no mail will be sent.
Christian Schneider
2004-06-28 00:41:27 UTC
Permalink
Post by Aziz Kaminh
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad keine
Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
Ja. Und? In den Manpages steht sicher mehr darueber.
--
crontab -e # edit new/ existing cron job ## Christian 'strcat' Schneider
crontab -l # list the cron jobs ## Email.......: ***@gmx.net
crontab -r # remove the cron jobs ## GPG-ID......: 47E322CE
cron(8), crontab(1) and crontab(5) ## [ RTFM => cron ]
Andreas Kneib
2004-06-28 07:51:29 UTC
Permalink
Post by Aziz Kaminh
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad keine
Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
,----[ crontab(5) ]-
| In addition to LOGNAME, HOME, and SHELL, cron(8) will look at MAILTO if
| it has any reason to send mail as a result of running commands in
| ``this'' crontab. If MAILTO is defined (and non-empty), mail is
| sent to the user so named. If MAILTO is defined but empty (MAILTO=""),
| no mail will be sent. Otherwise mail is sent to the owner of the
| crontab.
`----


Gruß,
Andreas
Thorsten Steinbrenner
2004-06-28 09:53:39 UTC
Permalink
Post by Aziz Kaminh
Post by Jan Schampera
IIRC einfach MAILTO unsetten. Kann mich aber auch irren, hab grad
keine Docs zur Hand.
sorry, hatte vergessen, das Debian verwende. Da steht in der
/etc/crontab nichts von MAILTO.
man 5 crontab:

"In addition to LOGNAME, HOME, and SHELL, cron(8) will look at
MAILTO if it has any reason to send mail as a result of running commands
in "this" crontab. If MAILTO is defined (and non-empty), mail is sent
to the user so named. If MAILTO is defined but empty (MAILTO=""),
no mail will be sent. Otherwise mail is sent to the owner of the crontab."

Tom
--
Die Summe aller Pleiten nennt man Erfahrung.
-- Oliver Behre
Felix M. Palmen
2004-06-27 21:15:30 UTC
Permalink
Post by Aziz Kaminh
Hallo,
cron sendet nach jeder ausgeführten Aktion in cron.hourly/daily Mails an
root. Da ich ein Backupscript laufen habe bekomme ich eine riesige Mail
mit dem Output an root, was mir über ein Modem zu lange dauert. Kann ich
irgendwo abstellen, das cron Mails an root sendet? danke!
Mails von cron sind im Fehlerfall wichtig. Deshalb solltest du lieber
die entsprechenden Scripts in cron.hourly/daily so abändern, dass die
Standardausgabe der verwendeten Programme auf /dev/null umgeleitet wird.
Und hoffen, dass die Programme sauber genug geschrieben sind, dass
wirklich die Fehler, wenn welche auftreten sollten, auf stderr landen
und sonst nichts. Natürlich kannst du auch stderr auf /dev/null
umleiten, aber das ist dann eben auch ein genereller "Maulkorb".

Grüße, Felix
--
-|- Felix M. Palmen (Zirias) http://zirias.ath.cx/ -|-
-|- ***@palmen.homeip.net (PGP pubkey: http://zirias.ath.cx/pub.txt) -|-
-|- try out http://mini-chat.ath.cx/ !! I never read HTML emails !! -|-
-|- PGP Fingerprint ED9B 62D0 BE39 32F9 2488 5D0C 8177 9D80 5ECF F683 -|-
Loading...