Вообщем не хочу поднимать у себя на компе почтовый сервер только ради
drcon'а (только не надо про unixway, только ради уведомлений поднимать
почтовый сервер). И решил его отучить от почты, добавиви кое что, вот
что в логах:
# cat /etc/crontab
# /etc/crontab
# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/files/crontab,v 1.6 2004/07/18 04:33:20 dragonheart Exp $
# fcron || dcron:
# This is NOT the system crontab! fcron and dcron do not support a system crontab.
# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron or dcron do
# crontab /etc/crontab
# as root.
# NOTE: This will REPLACE root's current crontab!!
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
MAILTO=
HOME=/
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
*/5 * * * * run-parts /etc/cron.6min/
*/1 * * * * run-parts /etc/cron.1min/
30 5 1 * * run-parts /etc/crom.weekly
0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
0 3 * * * rm -f /var/spool/cron/lastrun/cron.daily
15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
но он не хочет играть по моим правилам
# cat /var/log/cron.log
...
04-Oct-05 13:26 /usr/sbin/crond V2.9 dillon, started
04-Oct-05 13:26 failed user root parsing SHELL=/bin/bash
04-Oct-05 13:26 failed user root parsing PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
04-Oct-05 13:26 failed user root parsing MAILTO=
04-Oct-05 13:26 failed user root parsing HOME=/
04-Oct-05 13:27 USER root pid 1775 cmd run-parts /etc/cron.1min/
так же пробовал MAILTO="" но это так же не возымело результатов.
Вот собсно и два вопроса, а можно ли его заставить не посылать мыло, или посылать его но не поднимая локальный почтовый сервант?
Заранее спасибо!!!
вариант раз, костыль, но работает: >/dev/null 2>&1 в конце каждой строки с заданием. т.е. перенаправление всего вывода в null.
вариант два: ssmtp.
A secure, effective and simple way of getting mail off a system to your
mail hub. It contains no suid-binaries or other dangerous things - no mail
spool to poke around in, and no daemons running in the background. Mail is
simply forwarded to the configured mailhost. Extremely easy configuration.
.
WARNING: the above is all it does; it does not receive mail, expand aliases
or manage a queue. That belongs on a mail hub with a system administrator.
Дык с ssmtp не очень работает, ему (ssmtp) тоже нужен таки почтовый сервер.
Oct 4 15:56:06 cyclon sSMTP[3116]: Unable to connect to "cyclon" port 25.
Oct 4 15:56:06 cyclon sSMTP[3116]: Cannot open cyclon:25
я ему прописал свой комп а он ругается, гугление приводило только к то
что говорят мол надо ставить сендмыл и всё в таком духе :(
Так а как сей скрипт поможет, ssmtp же пытается приконнектиться к порту, это тут не поможет. А sendmail какой то есть , но не похож на него там что то другое, так что подсовывать не нужно.