"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

mdadm sendet keine mails

wergor 12.09.2013 - 00:07 1769 2
Posts

wergor

connoisseur de mimi
Avatar
Registered: Jul 2005
Location: graz
Posts: 4027
ich hab mir ein software raid5 aufgesetzt, und hätte gerne dass mir mdadm bei problemen automatisch per mail bericht erstattet.
ssmtp ist installiert und konfiguriert, testmail senden mit
Code:
ssmtp meine @email.adresse
geht einwandfrei.
wenn ich aber z.b. den befehl
Code:
[root@localhost /]# mdadm --monitor -m meine @email.adresse /dev/md0 -t
-oder-
[root@localhost /]# mdadm --monitor --scan --test
in die shell eingebe, passiert gar nix, keine mail, kein output, ich muss das programm mit ctrl+c killen.
meine emailadresse steht in der mdadm.conf:
Code:
MAILADDR meine @email.adresse
ideas?

COLOSSUS

Administrator
Frickler
Avatar
Registered: Dec 2000
Location: ~
Posts: 11902
Hast du auch ein /usr/sbin/sendmail am System, das ssmtp wrapped/aufruft? So macht mdadm im monitor-Mode das naemlich, wenn was gemailt werden soll.

Alternativ kannst du dir auch statt MAILADDR ein PROGRAM setzen, das dann z. B. ein Shellscript aufruft, das dir die gewuenschte Mail sendet.

Code:
       PROGRAM
              The  program  line  gives  the name of a program to be run when mdadm --monitor detects poten-
              tially interesting events on any of the arrays that it is monitoring.  This program  gets  run
              with  two  or  three  arguments, they being the Event, the md device, and possibly the related
              component device.

              There should only be one program line and it should be give only one program.

wergor

connoisseur de mimi
Avatar
Registered: Jul 2005
Location: graz
Posts: 4027
sendmail ist installiert. schaut aus als müsste ich mir ein skript basteln...

edit: habe dieses skript genommen, funktioniert perfekt.
und ich bin gerade draufgekommen, dass alle emails angekommen und im spamordner gelandet sind. normalerweise macht mich thunderbird auch auf spammails aufmerksam, nur hier anscheinend ned. und wieso das programm die shell blockiert hat, weis ich auch nicht.
Bearbeitet von wergor am 12.09.2013, 16:44
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz