/usr/sbin/mini_sendmail
ASUS WL5xx: FW 1.9.2.7-d-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | bip irc proxy
ASUS RT-N1x: FW 1.9.2.7-rtn-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | fake ident daemon
сделайте скрипт на баше, который назовите mail или еще как, который будет брать из параметров -s<...> и выставлять в текст вида Subject: <...>
ASUS WL5xx: FW 1.9.2.7-d-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | bip irc proxy
ASUS RT-N1x: FW 1.9.2.7-rtn-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | fake ident daemon
конкретно я для cron нарисовал скриптик
его запихать в каталог \opt\etc\cron.5mins\Code:#!/bin/sh # Simple SHELL script for Linux and UNIX system monitoring HOST="192.168.0.254" SERVICES="thttpd lighttpd cron proftpd" # email report when SUBJECT="Service is down" EMAILID="naves@random-domain.net" for myService in $SERVICES do echo testing $myService count=$(pidof $myService) echo count=$count if [ "$count" -eq 0 ]; then # Service failed echo "$HOST : $myService is down at $(date)" #echo "$HOST : $myService is down at $(date)" | sendmail -s "$SUBJECT" $EMAILID case "$myService" in "thttpd") echo "trying to start thttpd..." /opt/etc/init.d/S80thttpd start ;; "lighttpd") echo "trying to start lighttpd..." /opt/etc/init.d/S80lighttpd start ;; "proftpd") echo "trying to start proftpd..." /opt/sbin/proftpd ;; *) echo "default unknown" ;; esac else echo "$HOST : $myService is OK at $(date)" fi done
и не спрашивайте зачем у меня в списке проверяемых сервисов сам cron
Last edited by Omega; 22-08-2011 at 22:12. Reason: fixed
На d-link 320 поставил Sendmail, Lighttpd (php-fcgi, perl) Форум ExBB . Уж очень хочется чтоб пользователям пароль на почту присылался. Да и вообще, собственный почтовый сервер не помешал бы...
Вобщем жду помощи, как говориться, литр с меня (или даже два) Кстати очень интересная железка получилась
Last edited by autoelektrik; 11-12-2009 at 13:13.
в прошивке Олега есть mini_sendmail, не подойдет?
ASUS WL5xx: FW 1.9.2.7-d-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | bip irc proxy
ASUS RT-N1x: FW 1.9.2.7-rtn-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | fake ident daemon
Code:[admin@router root]$ mini_sendmail --help usage: mini_sendmail [-f<name>] [-t] [-s<server>] [-p<port>] [-T<timeout>] [-v] [address ...]mini_sendmail(8) mini_sendmail(8)
NAME
mini_sendmail - accept email on behalf of real sendmail
SYNOPSIS
mini_sendmail [-f<name>] [-t] [-s<server>] [-p<port>] [-T<timeout>] [-v] address ...
DESCRIPTION
With no flags, mini_sendmail reads its standard input up to an end-of-file and sends a copy of the message found there
to all of the addresses listed.
The message is sent by connecting to a local SMTP server. This means mini_sendmail can be used to send email from
inside a chroot(2) area.
-f Sets the name of the "from" person (i.e. the sender of the mail).
-t Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line
will be deleted before transmission.
-s Specifies the SMTP server to use. Without this it uses localhost.
-p Specifies the port to use. Without this it uses 25, the standard SMTP port.
-T Specifies timeout - defaults to one minute.
-v Verbose mode - shows the conversation with the SMTP server.
SEE ALSO
sendmail(8)
AUTHOR
Copyright <A9> 1999 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved.
ASUS WL5xx: FW 1.9.2.7-d-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | bip irc proxy
ASUS RT-N1x: FW 1.9.2.7-rtn-rXXXX / обсуждение прошивки [RU] / firmware discussion [EN] | fake ident daemon
Что-то припоминаю.... Было, задолбало. Пошло с nail вот так
в nail.rc делаешь настройки для провайдера логины, пароли, сервера pop smtpCode:$nail -A myisp -v -s "New message" lnrmn@xxx.ru < телописьма.msg Resolving host box.xxx.ru . . . done. Connecting to 217.xx.xx.37 . . . connected. 220 webmail.xxx.ru ESMTP >>> HELO WL500W 250 webmail.xxx.ru >>> MAIL FROM: <wl500w@xxx.ru> 250 2.1.0 Ok >>> RCPT TO: <lnrmn@xxx.ru> 250 2.1.5 Ok >>> DATA 354 End data with <CR><LF>.<CR><LF> >>> . 250 2.0.0 Ok: queued as A539A3E19E7 >>> QUIT 221 2.0.0 Bye
так же мучился. Переставил почти всех мэйл клиентов. Запарился до усеру. Только nail поставил, он оказался последним, прописал провайдера логин пароль - и АХХХ вздохнудл от щастия!!
Last edited by LnrMn; 03-07-2009 at 20:07.
Asus RT-AC66U, Xerox Phaser 3160B, on the shelf RT-N16 (Killed by lightning)
WL-500gPv1 128MB, WL-500W 300MHz/128M, LCD 40x4, DIR-320 8Mb/64MB
WL-700g 128MB, MNV25E2+ and more and more devices. provod.beeline.ru
-------------------------------------------
Computers. Since 1984. First one - "МИР-1"
Посмотрел сейчас где что...
в /tmp/local/root/.mailrc
в /opt/etc/nail.rc в самом концеCode:account myisp { set smtp=box.xxx.ru set from=wl500w@xxx.ru }
Вот вроде все настройки. Удачи.Code:# Hide some header fields which are uninteresting for most human readers. ignore received in-reply-to message-id references ignore mime-version content-transfer-encoding shortcut MyMail pop3://wl500w@xxx.ru:110 set password-wl500w@xxx.ru:110="password" # Only include selected header fields when forwarding messages. fwdretain subject date from to set smtp=box.xxx.ru set pop=box.xxx.ru set from="wl500w@xxx.ru"
Last edited by LnrMn; 03-07-2009 at 20:46.
Asus RT-AC66U, Xerox Phaser 3160B, on the shelf RT-N16 (Killed by lightning)
WL-500gPv1 128MB, WL-500W 300MHz/128M, LCD 40x4, DIR-320 8Mb/64MB
WL-700g 128MB, MNV25E2+ and more and more devices. provod.beeline.ru
-------------------------------------------
Computers. Since 1984. First one - "МИР-1"
Да... Темный лес... Все-таки раз я начал с sendmail думаю что продолжу с ним возиться до победного конца... Кто нибудь знаком с ним как говориться "на ты" ?
Куда уж проще в двух файлах мои данные заменить на свои...
box.xxx.ru - почтовик моего провайдера
wl500w@xxx.ru - адрес, который я зарегистрировал для моего роутера.
Last edited by LnrMn; 03-07-2009 at 20:57.
Asus RT-AC66U, Xerox Phaser 3160B, on the shelf RT-N16 (Killed by lightning)
WL-500gPv1 128MB, WL-500W 300MHz/128M, LCD 40x4, DIR-320 8Mb/64MB
WL-700g 128MB, MNV25E2+ and more and more devices. provod.beeline.ru
-------------------------------------------
Computers. Since 1984. First one - "МИР-1"
novlyanskoe.ru на твоем роутере крутится чтоль?
Asus RT-AC66U, Xerox Phaser 3160B, on the shelf RT-N16 (Killed by lightning)
WL-500gPv1 128MB, WL-500W 300MHz/128M, LCD 40x4, DIR-320 8Mb/64MB
WL-700g 128MB, MNV25E2+ and more and more devices. provod.beeline.ru
-------------------------------------------
Computers. Since 1984. First one - "МИР-1"