Package names:
|
1 |
apt-get install msmtp msmtp-mta |
Controlling,, installed well
|
1 2 |
$ msmtp --version | grep "System configuration" System configuration file name: /etc/msmtprc |
Set the email configuration
|
1 |
nano /etc/msmtprc |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
EXample configuration # Kutay Account account Kutay host smtphm.kutayzorlu.ca from from_home@localkutayzorlu.com.name tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt auth on user me_kutay@kutayzorlu.com password ******** syslog LOG_MAIL |
Apply settings for current user
|
1 |
msmtp --pretend |
Testing the mail :
|
1 |
echo "This is a test e-mail " | msmtp -d me@kutayzorlu.com |
|
1 2 |
sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.bak sudo ln -s /usr/bin/msmtp /usr/sbin/sendmail |
Change mail configuration,
|
1 |
sudo nano /etc/mdadm/mdadm.conf |
|
1 2 |
MAILADDR me@kutayzorlu.com MAILFROM kutay_zorlu - mdadm |
Monitoring
|
1 |
sudo mdadm --monitor --scan --test --oneshot |
Example Crontab,
|
1 2 |
crontab -e 10 10 1,6,7,10,16,21,24 * * /sbin/mdadm --monitor --scan --test --oneshot or /dev/md12 |
|
1 |
mdadm --monitor --scan --daemonize --test --syslog (/dev/md[[:digit:]]*) |
Autostart with mdadm
|
1 2 3 |
#mdadm.conf DAEMON_OPTIONS="--syslog --test (/dev/md[[:digit:]]*)" |
|
1 |
ps aux | grep mdadm |