Mail

ff

RockyLinux 8.4 ; Installing a mail server

# dnf -y install postfix* dovecot cyrus-sasl cyrus-sasl-plain cyrus-sasl-devel systemctl enable postfix systemctl enable dovecot systemctl enable saslauthd

# rpm -qa | grep postfixpostfix-2.10.1-7.el7.x86_64

# rpm -qa | grep saslcyrus-sasl-plain-2.1.26-23.el7.x86_64cyrus-sasl-lib-2.1.26-23.el7.x86_64cyrus-sasl-devel-2.1.26-23.el7.x86_64cyrus-sasl-md5-2.1.26-23.el7.x86_64   If this is not present # dnf install cyrus-sasl-md5cyrus-sasl-2.1.26-23.el7.x86_64

# systemctl enable postfix.serviceCreated symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to/usr/lib/systemd/system/postfix.service.



Editing the Postfix Configuration File

# cp -p /etc/sasl2/smtpd.conf `date '+ /etc/sasl2/smtpd.conf.%Y%m%d'`
# vi /etc/sasl2/smtpd.conf
■ Insert "#" at the beginning of the first and second lines, and add the contents# pwcheck_method: saslauthd# mech_list: plain loginpwcheck_method: auxpropauxprop_plugin: sasldbmech_list: cram-md5 digest-md5 plain login



# systemctl enable saslauthd.serviceCreated symlink from /etc/systemd/system/multi -user.target.wants/saslauthd.service to/usr/lib/systemd/sy stem/saslauthd.service.
# systemctl is-enabled saslauthd.serviceenabled

# systemctl start saslauthd.service

Dovecot configuration file



# cp -p /etc/dovecot/dovecot.conf `date '+ /etc/dovecot/dovecot.conf.%Y%m%d'`
# vi /etc/dovecot/dovecot.conf
■Add around line 25「# protocols = imap pop3 lmtpprotocols = imap pop3■Add to last line!include_try local.confdisable_plaintext_auth = nomail_location = maildir:~/Maildir

# vi /etc/dovecot/conf.d/10-ssl.conf
■ Per line 8 Insert "#" at the beginning of the line "ssl = required" and add "ssl = yes" at the bottom of the line

# systemctl enable dovecot.service# systemctl start dovecot.service














ff