Get the App
SLTechnology News&Howtos  ›  Servers  › 

Set up postfix for mail server

Shulou Source: shulou.com Published: 2022-06-02 22:55:13 10月04日 Update

Mail experiment

Three virtual machines (preferably basic service installation, to avoid errors due to too few rpm packages)

192.168.115.199-DNS

192.168.115.198-163.com

192.168.115.196-sina.com

1. Configure DNS

1.1.Configuring local yum source and installing domain name software bind

Yum-y install bind

1.2.Modification of domain name configuration file vi / etc/named.conf

Copy cp-a named.localhost 163.file

Forward parsing file of Mail.163.com

Cp-a 163.file sina.file

Forward parsing file of Mail.sina.com

Configure the network card and modify the domain name resolution file / etc/resolv.conf

Restart the domain name service service named restart

Restart the network card service service network restart

2. Configure the post office MTA of mail.163.com, on the 198client

Because postfix is installed by default, it can be configured directly

2.1.Configuring the network card and adding the IP of DNS

Restart the network service to see if it can be parsed properly

2.2. Modify the mail transfer profile

/ etc/postfix/main.cf

Configuration completed, service restart service postfix restart

The configuration of mail.sina.com client 196 is the same as that of mail.163.com for 198 client.

3. Send email test

Mail.sina.com client local yum source installation yum-y install telnet

Mail.163.com client local yum source installation yum-y install telnet

Send an email

Mail.sina.com client sends messages

Mail.163.com client receives mail

Tags: Configuration customer client service file mail domain name network card same basic method best end network network service software post office three sets transmission experiment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MySQL Microsoft Shulou Information MariaDB