#1 Le 10/05/2022, à 14:30
- jerm
[Résolu] Recevoir les mails de Smartd avec Postfix
Bonjour,
J'ai récemment installé un serveur qui fonctionne avec Raid5 (avec mdadm). Aucun souci à ce niveau-là, tout fonctionne parfaitement!
J'essaye de paramétrer smartd pour qu'il m'envoie des mails (sur un compte extérieur au serveur), mais impossible!
Je précise que je reçois bien les mails depuis Cron, ou RkHunter sans souci.
Voici le contenu de mon /etc/smartd.conf:
# Sample configuration file for smartd. See man smartd.conf.
# Home page is: http://www.smartmontools.org
# smartd will re-read the configuration file if it receives a HUP
# signal
# The file gives a list of devices to monitor using smartd, with one
# device per line. Text after a hash (#) is ignored, and you may use
# spaces and tabs for white space. You may use '\' to continue lines.
# You can usually identify which hard disks are on your system by
# looking in /proc/ide and in /proc/scsi.
# The word DEVICESCAN will cause any remaining lines in this
# configuration file to be ignored: it tells smartd to scan for all
# ATA and SCSI devices. DEVICESCAN may be followed by any of the
# Directives listed below, which will be applied to all devices that
# are found. Most users should comment out DEVICESCAN and explicitly
# list the devices that they wish to monitor.
DEVICESCAN -d removable -n standby -m monmail@monserveur.com,root -M exec /usr/share/smartmontools/smartd-runner
# Alternative setting to ignore temperature and power-on hours reports
# in syslog.
#DEVICESCAN -I 194 -I 231 -I 9
# Alternative setting to report more useful raw temperature in syslog.
#DEVICESCAN -R 194 -R 231 -I 9
# Alternative setting to report raw temperature changes >= 5 Celsius
# and min/max temperatures.
#DEVICESCAN -I 194 -I 231 -I 9 -W 5
# First ATA/SATA or SCSI/SAS disk. Monitor all attributes, enable
# automatic online data collection, automatic Attribute autosave, and
# start a short self-test every day between 2-3am, and a long self test
# Saturdays between 3-4am.
#/dev/sda -a -o on -S on -s (S/../.././02|L/../../6/03)
# Monitor SMART status, ATA Error Log, Self-test log, and track
# changes in all attributes except for attribute 194
#/dev/sdb -H -l error -l selftest -t -I 194
# Monitor all attributes except normalized Temperature (usually 194),
# but track Temperature changes >= 4 Celsius, report Temperatures
# >= 45 Celsius and changes in Raw value of Reallocated_Sector_Ct (5).
# Send mail on SMART failures or when Temperature is >= 55 Celsius.
#/dev/sdc -a -I 194 -W 4,45,55 -R 5 -m admin@example.com
# An ATA disk may appear as a SCSI device to the OS. If a SCSI to
# ATA Translation (SAT) layer is between the OS and the device then
# this can be flagged with the '-d sat' option. This situation may
# become common with SATA disks in SAS and FC environments.
# /dev/sda -a -d sat
# A very silent check. Only report SMART health status if it fails
# But send an email in this case
#/dev/sdc -H -C 0 -U 0 -m admin@example.com
# First two SCSI disks. This will monitor everything that smartd can
# monitor. Start extended self-tests Wednesdays between 6-7pm and
# Sundays between 1-2 am
#/dev/sda -d scsi -s L/../../3/18
#/dev/sdb -d scsi -s L/../../7/01
# Monitor 4 ATA disks connected to a 3ware 6/7/8000 controller which uses
# the 3w-xxxx driver. Start long self-tests Sundays between 1-2, 2-3, 3-4,
# and 4-5 am.
# NOTE: starting with the Linux 2.6 kernel series, the /dev/sdX interface
# is DEPRECATED. Use the /dev/tweN character device interface instead.
# For example /dev/twe0, /dev/twe1, and so on.
#/dev/sdc -d 3ware,0 -a -s L/../../7/01
#/dev/sdc -d 3ware,1 -a -s L/../../7/02
#/dev/sdc -d 3ware,2 -a -s L/../../7/03
#/dev/sdc -d 3ware,3 -a -s L/../../7/04
# Monitor 2 ATA disks connected to a 3ware 9000 controller which
# uses the 3w-9xxx driver (Linux, FreeBSD). Start long self-tests Tuesdays
# between 1-2 and 3-4 am.
#/dev/twa0 -d 3ware,0 -a -s L/../../2/01
#/dev/twa0 -d 3ware,1 -a -s L/../../2/03
# Monitor 2 SATA (not SAS) disks connected to a 3ware 9000 controller which
# uses the 3w-sas driver (Linux). Start long self-tests Tuesdays
# between 1-2 and 3-4 am.
# On FreeBSD /dev/tws0 should be used instead
#/dev/twl0 -d 3ware,0 -a -s L/../../2/01
#/dev/twl0 -d 3ware,1 -a -s L/../../2/03
# Same as above for Windows. Option '-d 3ware,N' is not necessary,
# disk (port) number is specified in device name.
# NOTE: On Windows, DEVICESCAN works also for 3ware controllers.
#/dev/hdc,0 -a -s L/../../2/01
#/dev/hdc,1 -a -s L/../../2/03
#
# Monitor 2 disks connected to the first HP SmartArray controller which
# uses the cciss driver. Start long tests on Sunday nights and short
# self-tests every night and send errors to root
#/dev/sda -d cciss,0 -a -s (L/../../7/02|S/../.././02) -m root
#/dev/sda -d cciss,1 -a -s (L/../../7/03|S/../.././03) -m root
# Monitor 3 ATA disks directly connected to a HighPoint RocketRAID. Start long
# self-tests Sundays between 1-2, 2-3, and 3-4 am.
#/dev/sdd -d hpt,1/1 -a -s L/../../7/01
#/dev/sdd -d hpt,1/2 -a -s L/../../7/02
#/dev/sdd -d hpt,1/3 -a -s L/../../7/03
# Monitor 2 ATA disks connected to the same PMPort which connected to the
# HighPoint RocketRAID. Start long self-tests Tuesdays between 1-2 and 3-4 am
#/dev/sdd -d hpt,1/4/1 -a -s L/../../2/01
#/dev/sdd -d hpt,1/4/2 -a -s L/../../2/03
# HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE.
# PLEASE SEE THE smartd.conf MAN PAGE FOR DETAILS
#
# -d TYPE Set the device type: ata, scsi, marvell, removable, 3ware,N, hpt,L/M/N
# -T TYPE set the tolerance to one of: normal, permissive
# -o VAL Enable/disable automatic offline tests (on/off)
# -S VAL Enable/disable attribute autosave (on/off)
# -n MODE No check. MODE is one of: never, sleep, standby, idle
# -H Monitor SMART Health Status, report if failed
# -l TYPE Monitor SMART log. Type is one of: error, selftest
# -f Monitor for failure of any 'Usage' Attributes
# -m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
# -M TYPE Modify email warning behavior (see man page)
# -s REGE Start self-test when type/date matches regular expression (see man page)
# -p Report changes in 'Prefailure' Normalized Attributes
# -u Report changes in 'Usage' Normalized Attributes
# -t Equivalent to -p and -u Directives
# -r ID Also report Raw values of Attribute ID with -p, -u or -t
# -R ID Track changes in Attribute ID Raw value with -p, -u or -t
# -i ID Ignore Attribute ID for -f Directive
# -I ID Ignore Attribute ID for -p, -u or -t Directive
# -C ID Report if Current Pending Sector count non-zero
# -U ID Report if Offline Uncorrectable count non-zero
# -W D,I,C Monitor Temperature D)ifference, I)nformal limit, C)ritical limit
# -v N,ST Modifies labeling of Attribute N (see man page)
# -a Default: equivalent to -H -f -t -l error -l selftest -C 197 -U 198
# -F TYPE Use firmware bug workaround. Type is one of: none, samsung
# -P TYPE Drive-specific presets: use, ignore, show, showall
# # Comment: text after a hash sign is ignored
# \ Line continuation character
# Attribute ID is a decimal integer 1 <= ID <= 255
# except for -C and -U, where ID = 0 turns them off.
# All but -d, -m and -M Directives are only implemented for ATA devices
#
# If the test string DEVICESCAN is the first uncommented text
# then smartd will scan for devices.
# DEVICESCAN may be followed by any desired Directives.
J'ai aussi modifié le /etc/smartmontools/run.d/10mail parce que j'utilise postfix:
#!/bin/bash -e
# Send mail if /usr/bin/mail exists
if ! [ -x /usr/sbin/sendmail -t ]; then
echo "Your system does not have /usr/bin/mail. Install the mailx or mailutils package"
exit 1
fi
input=$1
shift
/usr/sbin/sendmail -t monnom "$@" < $input
(remarquez que même avant de le modifier, je n'ai jamais reçu l'alerte "Your system does not have /usr/bin/mail")
Et mon /etc/default/smartmontools:
# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
# This is a POSIX shell fragment
# List of devices you want to explicitly enable S.M.A.R.T. for
# Not needed (and not recommended) if the device is monitored by smartd
#enable_smart="/dev/hda /dev/hdb"
start_smartd=yes
# uncomment to pass additional options to smartd on startup
smartd_opts="--interval=1800"
D'après les logs des mails, les mails partent bien...
May 10 13:15:51 localhost postfix/pickup[32672]: 2AF271A40437: uid=0 from=<root@localhost>
May 10 13:15:51 localhost postfix/cleanup[62094]: 2AF271A40437: message-id=<20220510131551.2AF271A40437@monserveur.com>
May 10 13:15:51 localhost postfix/qmgr[32673]: 2AF271A40437: from=<root@localhost>, size=3864, nrcpt=1 (queue active)
May 10 13:15:51 localhost postfix/local[62096]: warning: database /etc/aliases.db is older than source file /etc/aliases
May 10 13:15:51 localhost postfix/local[62096]: 2AF271A40437: to=<root@monserveur.com>, orig_to=<monmail@monserveur.com>, relay=local, delay=0.36, delays=0.35/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May 10 13:15:51 localhost postfix/qmgr[32673]: 2AF271A40437: removed
Mais je ne reçois rien! La commande:
echo "DEVICESCAN -a -m monmail@monserveur.com -M test" > /tmp/FIC && sudo smartd -n -q onecheck -c /tmp/FIC
ne renvoit aucune erreur... mais aucun mail non plus!
Si quelqu'un voit où j'ai fauté...
Merci d'avance!
Dernière modification par jerm (Le 12/05/2022, à 06:06)
Hors ligne
#2 Le 10/05/2022, à 15:19
- iznobe
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Bonjour , je ne sais pas si " smartmontools " a un rapport avec " smartd " ou avec l ' envoie de mail .
Normalement : smartmontools , c ' est un outil pour verifier l ' etat des disques dur !
De plus , logiquement ce post serait probablement mieux placé dans la section serveur non ?
Dernière modification par iznobe (Le 10/05/2022, à 15:25)
retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#3 Le 10/05/2022, à 15:22
- jerm
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Bonjour iznobe,
smartd a bien quelque chose à voir avec smartmontools!
D'ailleurs, on lit ceci, dans la page: Grâce au service (daemon) smartd il est possible de faire une analyse régulière et ainsi suivre sur le long terme l'état des disques durs et de votre matériel. (point 4)
On y lit aussi qu'il faut installer mailx ou mailutils, mais j'ai cru comprendre que cela fonctionnait aussi avec postfix...
Hors ligne
#4 Le 10/05/2022, à 15:30
- iznobe
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Du coup , si je comprends bien , tu voudrais recevoir des mails de rapport de smartmontools qui se lance toutes les 1800 secondes ?
il faudrait eclaircir ces 2 phrases aussi :
J'essaye de paramétrer smartd pour qu'il m'envoie des mails (sur un compte extérieur au serveur), mais impossible!
Je précise que je reçois bien les mails depuis Cron, ou RkHunter sans souci.
On est d' accord que sur un autre ordi , tu recois bien les mails du serveur via cron et rkhunter , que tu essaies actuellement de configurer pour smartd ?
ce qui confirme que postfix a priori fonctionne , car c ' est lui que tu utilises a travers cron et rkhunter ?
Dernière modification par iznobe (Le 10/05/2022, à 15:36)
retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#5 Le 10/05/2022, à 15:38
- jerm
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
De ce que j'ai compris, plutôt, c'est que l'analyse se lance toutes les 1800 secondes, et un rapport est envoyé en cas de défaillance d'un des disques.
Hors ligne
#6 Le 10/05/2022, à 16:23
- iznobe
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
bon , j ' ai l ' impression que repondre aux questions , ca n' est pas trop ton fort
Bref , que fait cette commande ? et ou l' as tu recuperé ? ( je persiste avec mes questions )
echo "DEVICESCAN -a -m monmail@monserveur.com -M test" > /tmp/FIC && sudo smartd -n -q onecheck -c /tmp/FIC
Si cela fonctionne comme tu dis dans ton message precedent : envoie de mail uniquement en cas de probleme , cette commande lance un scan non ?
donc c ' est peut etre normal que tu ne recoives pas de mail ? Enfin si tes disques sont en bon etat ...
Dernière modification par iznobe (Le 10/05/2022, à 16:31)
retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .
Hors ligne
#7 Le 10/05/2022, à 17:18
- Tawal
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Hello,
Tout en bas de /etc/smartd.conf, il y a les explications des différentes options dont :
# -m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
Il faut donc utiliser une de ces options.
Chez moi, ces deux lignes dans /etc/smartd.conf font que je reçois des mails en cas d'erreur :
/dev/sda -H -m tawal@Deb1 -M exec /usr/share/smartmontools/smartd-runner
/dev/sdb -H -m tawal@Deb1 -M exec /usr/share/smartmontools/smartd-runner
Peut-être, tu peux essayer avec :
DEVICESCAN -d removable -n standby -H -m monmail@monserveur.com,root -M exec /usr/share/smartmontools/smartd-runner
Edit: exemple de mail reçu plus important :
Une erreur dans /etc/smartmontools/run.d/10mail :
if ! [ -x /usr/sbin/sendmail -t ]
devrait être :
if ! [ -x /usr/sbin/sendmail ]
Tu ne pourras jamais recevoir de mail avec cette erreur.
Car il y a l'option "-e" de bash qui est activée, ce qui veut dire sortie en cas d'erreur.
Or ton if provoque une erreur donc le script sort dès le if, donc pas de mail même avec une bonne configuration du reste.
Edit2: edit de l'edit
Dernière modification par Tawal (Le 10/05/2022, à 20:59)
Le savoir n'a d’intérêt que si on le transmet.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !
Hors ligne
#8 Le 10/05/2022, à 22:14
- geole
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Bonsoir.
La documentation smartmontools explique comment tester le fonctionnement de la messagerie en fabriquant un message fictif.
Dernière modification par geole (Le 11/05/2022, à 10:04)
Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit, utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248
Hors ligne
#9 Le 11/05/2022, à 09:59
- jerm
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Bonjour à tous!
Tout d'abord, merci pour vos retours!
On est d' accord que sur un autre ordi , tu recois bien les mails du serveur via cron et rkhunter , que tu essaies actuellement de configurer pour smartd ?
ce qui confirme que postfix a priori fonctionne , car c ' est lui que tu utilises a travers cron et rkhunter ?
C'est tout à fait ça!
Tout en bas de /etc/smartd.conf, il y a les explications des différentes options dont :
# -m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
L'ajout "-H" ne semble pas fonctionner.
J'ai aussi modifié mon /etc/smartmontools/run.d/10mail:
#!/bin/bash -e
# Send mail if /usr/bin/mail exists
if ! [ -x /usr/sbin/sendmail ]; then
echo "Your system does not have /usr/bin/mail. Install the mailx or mailutils package"
exit 1
fi
input=$1
shift
/usr/sbin/sendmail "$@" < $input
Mais il y a du nouveau! Après avoir voulu régler le problème de warning de postfix que l'on voyait dans le log des mails, je reçois maintenant des "Undelivered Mail Returned to Sender" sur mon adresse externe...
This is the mail system at host localhost.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<postmaster@monserveur.com>: host mx1.ovh.net[188.165.47.122] said: 504 5.5.2
<root@localhost>: Sender address rejected: need fully-qualified address (in
reply to RCPT TO command)
Chose un peu embêtante, c'est que maintenant, je reçois aussi en Undelivered les mails de Fail2Ban à chaque fois qu'il envoie un mail à root pour signaler une ip bannie!
Il semblerait que je ne puisse plus envoyer de mails à root@localhost!
Voici mon fichier aliases:
# See man 5 aliases for format
postmaster: root
root: postmaster@monserveur.com
Sachant que "postmaster@monserveur.com" est l'adresse à laquelle j'aimerais recevoir les mails.
Voici aussi mon main.cf de postfix, si ça peut aider:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain, localhost, localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_use_tls = yes
#smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
#smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
#smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
#smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#mailbox_command = procmail -a "$EXTENSION"
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
J'avoue que je commence à être paumé, là!
Hors ligne
#10 Le 11/05/2022, à 13:17
- Tawal
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Je t'ai dit ce que je savais sur smartd.
[Edit]
L'ajout "-H" ne semble pas fonctionner.
Fais le test d'envoi de mail pour smartd comme le préconise Geole (en suivant les indications de la documentation).
[/Edit]
Pour le reste, je suis incompétent à aider
Dernière modification par Tawal (Le 11/05/2022, à 13:19)
Le savoir n'a d’intérêt que si on le transmet.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !
Hors ligne
#11 Le 11/05/2022, à 13:41
- jerm
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Merci d'avoir essayé!
Si je ne m'abuse, la ligne dont il parle est celle-ci:
echo "DEVICESCAN -a -m postmaster@monserveur.com -M test" > /tmp/FIC && sudo smartd -n -q onecheck -c /tmp/FIC
En y ajoutant le -H, je reçois uniquement des "Undelivered" sur mon adresse externe. C'est ça qui me fait penser que le problème vient de Postfix!
D'ailleurs, j'ai réussi à recevoir directement les mails de Fail2Ban sur mon adresse externe (mais maintenant, j'en reçois à foison!) en inversant destemail et sender! Je dois mettre "root@localhost" en destemail et "postmaster@monserveur.com" en sender pour recevoir directement sur "postmaster"...
Ah! Remplacer postmaster@monserveur.com par root@localhost dans la ligne ci-dessus ne change rien: je reçois uniquement des "Undelivered" sur postmaster@monserveur.com...
Hors ligne
#12 Le 11/05/2022, à 21:32
- Tawal
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Hummm,
Je pense que tu as un souci dans ta configuration de postfix.
Mais pareil, je ne peux pas t'aider par méconnaissance
Plutôt que lancer un smartd supplémentaire pour faire le test, j'indiquerais l'option -M test directement dans /etc/smartd.conf et redémarrerais le service smartd avec :
sudo systemctl restart smartd.service
si tu es bien sous systemd et pas sysV.
Le savoir n'a d’intérêt que si on le transmet.
Useless Use of Cat Award
Filenames and Pathnames in Shell: How to do it Correctly
À chaque problème sa solution, à chaque solution son moyen, si pas de moyen, toujours le problème !
Hors ligne
#13 Le 12/05/2022, à 05:55
- jerm
Re : [Résolu] Recevoir les mails de Smartd avec Postfix
Bonjour!
Je pense que j'ai enfin trouvé la cause!
En fait, modifier le fichier /etc/smartmontools/run.d/10mail ne suffit pas (qui ne sert finalement qu'à prévenir si mail n'existe pas). Il faut surtout modifier le fichier /usr/share/smartmontools/smartd_warning.sh.
Une fois que j'avais modifié la ligne
os_mailer="mail"
par
os_mailer="/usr/sbin/sendmail"
j'ai commencé à recevoir des messages d'erreur au moment du test:
sendmail: invalid option -- 's'
sendmail: invalid option -- 's'
sendmail: fatal: usage: sendmail [options]
J'ai donc cherché dans le code et ai trouvé. Remplacer
if [ -n "$dryrun" ]; then
echo "exec '$SMARTD_MAILER' -s '$SMARTD_SUBJECT' $SMARTD_ADDRESS <<EOF
$fullmessage
EOF"
else
exec "$SMARTD_MAILER" -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS <<EOF
$fullmessage
EOF
par
if [ -n "$dryrun" ]; then
echo "exec '$SMARTD_MAILER' $SMARTD_ADDRESS <<EOF
subject: '$SMARTD_SUBJECT'
$fullmessage
EOF"
else
exec "$SMARTD_MAILER" $SMARTD_ADDRESS <<EOF
subject: '$SMARTD_SUBJECT'
$fullmessage
EOF
Ainsi, smartd utilise bien sendmail (et non mail)!
Merci pour votre patience et votre réaction!
Hors ligne