LINUX.ORG.RU
ФорумAdmin

cron срет на почту


0

0

cron срет мне на админскую почту сообщениями вида:

Delivery to the following recipient failed permanently:

    andrey@smtp.gmail.com:587

Technical details of permanent failure:
Probe failed: Illegal envelope To: address (invalid domain name): andrey@smtp.gmail.com:587

----- Original message -----

Received: by 10.204.5.207 with SMTP id 15mr2235303bkw.89.1263165836187;
       Sun, 10 Jan 2010 15:23:56 -0800 (PST)
Return-Path: <andreykyz@gmail.com>
Received: from smtp.gmail.com:587 ([213.252.92.10])
       by mx.google.com with ESMTPS id 14sm8593387bwz.9.2010.01.10.15.23.54
       (version=TLSv1/SSLv3 cipher=RC4-MD5);
       Sun, 10 Jan 2010 15:23:55 -0800 (PST)
Message-ID: <4b4a618b.0e1abc0a.5a80.ffffa9f0@mx.google.com>
Received: by smtp.gmail.com:587 (sSMTP sendmail emulation); Mon, 11 Jan 2010 02:24:01 +0300
From: andrey <andreykyz@gmail.com>
Date: Mon, 11 Jan 2010 02:24:01 +0300
To: andrey
Subject: Cron <andrey@bonanza-server> root /home/komar/DavidovoJB-0.1-Final/davidovoinfo-start.sh --stop && /home/komar/DavidovoJB-0.1-Final/davidovoinfo-start.sh --start && echo `date` >> /home/komar/DavidovoJB-0.1-Final/start_stop
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/andrey>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=andrey>
как это дело пресечь??

Ответ на: комментарий от anonymous

Где это написано? В упор не вижу перенаправления STDOUT и STDERR...

Cron шлет нотификации в том случае, если код возврата не равен 0, или скрипты что-то выводят что-то на STDOUT.

oc
()
Ответ на: комментарий от Noldor

Там же, вроде как не крон сообщения кидает... а почтовик...

Это крон

andreykyz ★★
() автор топика
Ответ на: комментарий от sdio

Как уже сказали или почту настрой

Что значит настрой почту!!!!!!!!!!!!!!!????????????777777777777

или выстави MAILTO=«»

Где конкретно????

andreykyz ★★
() автор топика
Ответ на: комментарий от andreykyz

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.  MAILTO may also be used to direct mail to multi‐
       ple recipients by separating recipient users with a comma. If MAILTO is
       defined but empty (MAILTO=""), no mail will be sent.  Otherwise mail is
       sent to the owner of the crontab.
sdio ★★★★★
()
Ответ на: комментарий от andreykyz

Что значит настрой почту!!!!!!!!!!!!!!!????????????777777777777

Ты думаешь это

andrey@smtp.gmail.com:587

нормальный почтовый адрес?

sdio ★★★★★
()
Ответ на: комментарий от sdio

Ну тогда продолжай успокаивать себя.

Если адрес неправельный тогда как мне на эту почту приходят сообщения по 50 в день?

/etc/ssmtp/ssmtp.conf в студию.

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
#hostname=bonanza-server

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES

hostname=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=andreykyz
AuthPass=password

andrey@bonanza-server:~$ cat /etc/crontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

# m h dom mon dow user	command
01 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

andreykyz ★★
() автор топика
Ответ на: комментарий от andreykyz

ОП - НОРКОМАН
в придачу слепой
и не читавший сайта гугля по настройке smtp
требуется ПОЛНЫЙ логин в виде ПОЛНОГО емейла

guyvernk
()
Ответ на: комментарий от andreykyz

>Непонимаю, написал MAILTO=«» в /etc/crontab а сообщения все равно приходят :( Cron осознал себя как личность. Вот так однажды скайнет и родится.

anonymous
()
Ответ на: комментарий от andreykyz

FromLineOverride включи, у тебя ssmtp переделывает From:, на что Google обижается, да, и в /etc/ssmtp/revaliases загляни. Про аутентификацию, вроде, сказали уже.

BTW, «на админскую почту» - это куда?

Непонимаю, написал MAILTO=«» в /etc/crontab а сообщения все равно приходят :(

grep -RIls MAILTO /var/spool/cron/crontabs

undertaker ★★
()
Ответ на: комментарий от undertaker

FromLineOverride включи, у тебя ssmtp переделывает From:, на что Google обижается, да, и в /etc/ssmtp/revaliases загляни. Про аутентификацию, вроде, сказали уже.

Не понимаю причем сдесь отправщик почты. Генерит сообщения не sstmp, а cron. Если cron выключить сообщения приходить прекращают.

grep -RIls MAILTO /var/spool/cron/crontabs

/var/spool/cron/crontabs - это каталог

andrey@bonanza-server:~$ sudo cat /var/spool/cron/crontabs/andrey

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.pi8kIJ/crontab installed on Wed Jan  6 18:21:31 2010)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# m h  dom mon dow   command
0-59 * * * *   root /home/komar/DavidovoJB-0.1-Final/davidovoinfo-start.sh --stop && /home/komar/DavidovoJB-0.1-Final/davidovoinfo-start.sh --start && echo `date` >> /home/komar/DavidovoJB-0.1-Final/start_stop
andrey@bonanza-server:~$ sudo cat /var/spool/cron/crontabs/root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.TtlWhW/crontab installed on Tue Sep 15 21:56:53 2009)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
43 0 * * * /etc/webmin/cron/tempdelete.pl

andreykyz ★★
() автор топика
Ответ на: комментарий от andreykyz

cat /etc/crontab

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

# m h dom mon dow user  command
01 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

andreykyz ★★
() автор топика
Ответ на: комментарий от andreykyz

cat /etc/ssmtp/revaliases

# sSMTP aliases
# 
# Format:       local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
cat /etc/ssmtp/ssmtp.conf
root=postmaster
mail.domain.com
mailhub=smtp.gmail.com:587
FromLineOverride=YES
hostname=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=andreykyz@gmail.com
AuthPass=password

andreykyz ★★
() автор топика
Ответ на: комментарий от andreykyz

Офигеть на лоре не знают ка настроить крон

andreykyz ★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.