Доброго времени!

Господа подскажите как правильно приготовить отправку лога? У
logrotate есть ключик -m (--mail):

#############################################################
 Tells  logrotate  which command to use when mailing logs. This
command should accept two arguments: 1) the subject of the message,
and 2) the recipient. The command must then read a message on standard
input and mail it to the  recipient.  The default mail command is
/usr/bin/mail -s.
#############################################################

, но как я его не это реализовать:

################################
/home/comp/tmp/log.test123
{
daily
missingok
rotate 4
compress
delaycompress
notifempty
mail t...@domen.ru
sharedscripts
 prerotate
endscript
 postrotate
endscript
}
################################

При запуске получаю

################################
# logrotate -v -f test
reading config file test
reading config info for /home/comp/tmp/log.test123


Handling 1 logs

rotating pattern: /home/comp/tmp/log.test123
 forced from command line (4 rotations)
empty log files are not rotated, old logs mailed to t...@domen.ru
considering log /home/comp/tmp/log.test123
  log does not need rotating
not running prerotate script, since no logs will be rotated
not running postrotate script, since no logs were rotated
################################

Cообщение не отправляется.

Варианты:
logrotate -m -v -f test
logrotate -m='/usr/bin/mail -s "test" t...@domen.ru"'  -v -f test
ни к чему не привели.


П.С. Отправка почты не настроена (postfix), но в /var/log/mail* ничего
не пишется, в том числе ошибок, в отличие от того, если пробовать mail
t...@domen.ru. Но это следующий этап...


-- 
Relax, take it easy!

-- 
ubuntu-ru mailing list
ubuntu-ru@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru

Дати відповідь електронним листом