smartd na Slackware bez sendmaila

Dziś zauważyłem ciekawe zachowanie smartd na systemie bez zainstalowanego Sendmaila.

Oct 30 23:18:08 host smartd[6090]: Monitoring 2 ATA and 0 SCSI devices
Oct 30 23:18:08 host smartd[6090]: Executing test of mail to admin@domena.pl ...
Oct 30 23:18:08 host smartd[6090]: Test of mail to admin@domena.pl: successful
Oct 30 23:18:08 host smartd[6090]: Executing test of mail to admin@domena.pl ...
Oct 30 23:18:08 host smartd[6090]: Test of mail to admin@domena.pl: successful

Niby wszystko pięknie, ale rzeczone maile na wskazane konto wcale nie dotarły. Co więcej, nie dotarły nawet do MTA (w którego logach cisza). Jak to mówią - kiedy wszystko inne zawiedzie, przeczytaj dokumentację:

$ man smartd
[...]
 -M TYPE
[...]
   exec PATH - run the executable PATH instead of the default  mail
   command, when smartd needs to send email.  PATH must point to an
   executable binary file or script.
[...]
   If  the  ´-m ADD´ Directive is given with a normal address argu-
   ment, then the executable pointed to by PATH will be  run  in  a
   shell  with  STDIN  receiving the body of the email message, and
   with the same command-line arguments:
   -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
   that would normally be provided to ´mail´.
$

Oznacza to, że domyślnie do wysyłania maili z powiadomieniami smartd korzysta z polecenia mail, które w Slackware 10.2 przychodzi w pakiecie nail.

Problem jest o tyle dziwny, że według dokumentacji smartd, jeżeli aplikacja podana jako argument do -M exec wypisze cokolwiek na standardowe wyjście (stdout) lub standardowe wyjście błędów (stderr), to fakt ten zostanie uznany za błąd i zalogowany. Domyślnie skonfigurowany nail wywołuje bezspośrednio /usr/lib/sendmail, którego na tym konkretnym systemie nie ma (gdyż jako MTA pracuje tu Postfix) i wobec jego braku wypisuje stosowny komunikat:

$ echo test | mail -s "Mail testowy" admin@domena.pl
/usr/lib/sendmail: No such file or directory
"/home/uzytkownik/dead.letter" 9/218
. . . message not sent.
$ echo $?
0
$

Dlaczego więc smartd uważa, że wszystko poszło dobrze? Być może wpływ na to ma zerowy kod wyjścia nail w powyższym przykładzie.

Rozwiązać ten problem można na dwa sposoby:

  • edytując plik konfiguracyjny naila (domyślnie /etc/nail.rc) i ustawiając w nim poprawną ścieżkę do binarki emulującej sendmaila:
    set sendmail=/usr/sbin/sendmail.postfix

    lub każąc wysyłać maile poprzez SMTP:

    set smtp=127.0.0.1
  • tworząc link symboliczny w /usr/lib, wskazujący na odpowiednią binarkę:
    # ln -sf /usr/sbin/sendmail.postfix /usr/lib/sendmail

Drugie rozwiązanie ma szansę zapobiec ewentualnym niespodziankom z innymi programami, które oczekują, że /usr/lib/sendmail istnieje.

Postfix

A ja myślę, że najlepszym rozwiązaniem jest odinstalowanie postfixa i zainstalowanie sendmaila.
W końcu nie po to używamy Slackware żeby używać postfixów. Jest on może dobry dla użytkowników fedory albo ubuntu ale nie dla prawdziwych slackwareowców.

nike air max

This fashionable air Force one Bespoke is really eye-catching with its colors breathtaking as nicely as the elements are flawless nicely to market fine art and fantastic imagination. This style of nike trainers has loud colour plan is developed by Gary Warnett in dim grey/orange/white/gum colourway.nike air max 95
These Kevin Doohan red-colored Bull AF1 was inspired through the Doonan, who can be a staff on the vitality consume manufacturer as nicely as the implementation on the slim beverage container.nike air max 1 The Patent leather-based silver was utilized to the toe and middle panel (appears like a matte finish) with grey nubuck around the toe and ribbons placket. The rear panel is produced of rubberized leather-based as may be the heel, then a red-colored tab is reflective 3M. No term if Doonan sprouted wings upon attempting them on, but this fantastic colorway used from a fascinating inspiration is absolutely worth noting.

The whole we are still rounded with a typical Nike Air Patch in colors Infrared / Black and the same color outsole and a custom swoosh in Dark gray.the north face outlet If the Shoes also with you in your Collection should not be missing, you should now act relatively quickly, before all Sizes including the Purchaze Sneaker Shop sold out! In two days it has finally come.
Although it is difficult to understand for so many nike footwear Collector, But according to our information, this Nike Air 180 not Germany be officially available.here For a few days, it is this Model but in England.

ynamic man walking shoes

If I were Nicholas tse children, I will give up step, endorsements, to love that Nike shoes endorsements, because of this Nike Lunarglide 3 is enough energy, enough movement. Although Nike Air Shoes the integral design based on BanXie design, but this kind of shoes suitable for badminton, basketball, jogging and so on many sports. Be worth what carry is, this type of Nike Air Max 90 Shoes hive of type the insole is designed, make
steps perspiration effect is better, after motion is very comfortable, Nike Air Force 1 Shoes shock absorption effect is good, for in the four seasons, from inside to outside that a spot breath.