User Tools

Site Tools


en:for_admin:emails

Emails

This article describes how to configure the Eden cluster servers to send email notifications.

1. Remove all unnecessary interfering packages:

apt purge postfix* exim* mailutils* sendmail*
apt autoremove

2. Install the MTA (Mail Transport Agent) program called msmtp:

apt install msmtp

3. Add the configuration file /etc/msmtprc and include the following content:

defaults
auth off
tls off
account default
host poczta.mini.pw.edu.pl
port 25
from <HOST-NAME>@mini.pw.edu.pl
logfile /var/log/msmtp

Update the sending server's hostname!

4. Link the msmtp program to the sendmail command:

ln -s /usr/bin/msmtp /usr/sbin/sendmail

5. Create the /var/log/msmtp file and set the permissions:

touch /var/log/msmtp
chown msmtp:root msmtp
chmod 660 msmtp

6. Create a logrotate entry for the log file and save it to: /etc/logrotate.d/msmtp

/var/log/msmtp {
    daily
    rotate 7
    compress
    delaycompress
    missingok
    notifempty
    create 660 msmtp root
}
en/for_admin/emails.txt · Last modified: 2024/12/30 03:22 by mkadlof