Click here for "Error Codes for Commercial Air Conditioners".

CentOS7.6; Mail Server Deployment 

1.Install outgoing server Postfix

Postfix is an SMTP server for sending mails.
If you implement SMTP-AUTH in Postfix, you can use the SMTP server from outside relatively safely. This is because normal SMTP does not require an account name and password when sending mails. This makes it possible for malicious people to abuse the system for spam purposes. When you receive mail (POP server), you are authenticated normally.
However, with SMTP-AUTH, the user of the SMTP server can be limited by checking the user's account name and password against the account name and password registered in the server.
Therefore, in order to send mails from outside, we can build a mailer with SMTP-AUTH function.
To implement SMTP-AUTH, we used the following software.
cyrus-sasl-md5
cyrus-sasl-2.1.26-23
cyrus-sasl-devel-2.1.26-23

1.1 Installing Postfix

①Check if Postfix is installed, and register it to start automatically.

②Installing Cyrus SASL
This is an essential package for realizing SMTP-AUTH.

③Installing cyrus-sasl-md5
This package is responsible for the individual authentication process.

④Editing smtpd.conf
To use individual user names and passwords for SMTP authentication

⑤Create Maildir-style mailboxes
Postfix mail storage format will be moved from shared directory format to Maildir format for better access performance and security.
【New user support】
When a new user is added, a Maildir style mailbox will be created in the home directory automatically.
Automatically create Maildir-style mailbox when adding a new user.
Permission settings
⑥Create a user for mail and set a password (user: exampleuser, password: pass)
Only if you want to use individual user names and passwords for SMTP authentication
⑦Change /etc/sasldb2 ownership group to postfix
⑧Edit the Postfix configuration file main.cf.
⑧Edit the Postfix configuration file master.cf
Write the setting to open the submission port 587 in master.cf.
Then, start Postfix.

2.Deploying the receiving server Dovecot

2.1 Install Dovecot

①Download and install

②Download and install dependent packages

③Edit the dovecot.conf file

④Editing the 10-ssl.conf file
The configuration file for SSL is 10-ssl.conf, which is contained in the directory "/etc/dovecot/conf.d". Change this file

⑤Automatically start dovecot and reflect settings

3.Configure connection permissions to the firewall.

3.1 Add SMTP and POP3 to the allowed connection services

Check and comment out the following in the iptablessh sample in "Building a CentOS 7.6 Server: Initial Settings after OS Installation".

# SMTP
/sbin/iptables -A INPUT -p tcp --dport 25 -j LOG
/sbin/iptables -A INPUT -p tcp --sport 25 -j LOG
/sbin/iptables -A INPUT -p tcp --dport 25 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --sport 25 -j ACCEPT
# pop3
/sbin/iptables -A INPUT -p tcp --dport 110 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --sport 110 -j ACCEPT

4.Email software settings (using POP)

When using Thunderbird as your mail software
Configure the mail account settings by clicking "File" ⇒ "New" ⇒ "Existing Mail Account" in the menu.


Check "I understand the risks involved in connecting" and "Done."

タイトルとURLをコピーしました