X. Edit the configuration file
[Root@mail ~]# Cp/etc/postfix/main.cf/etc/postfix/main.cfbak #备份
[Root@mail ~]# VIM/ETC/POSTFIX/MAIN.CF
#myhostname = Host.domain.tld
Modify
Myhostname = mail.postfix.org #本机名
#mydomain = Domain.tld
Modify:
MyDomain = postfix.org #域名
#myorigin = $mydomain
Amended to
Myorigin = $mydomain
113 #inet_interfaces = All
Amended to
113 Inet_interfaces = All
161 #mydestination = $myhostname, localhost. $mydomain, localhost, $mydomain
Amended to
161 mydestination = $myhostname, localhost. $mydomain, localhost, $mydomain
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
Amended to
Mynetworks = 127.0.0.0/8 #提供邮件转发功能的网段
: Wq
[Root@mail ~]# service postfix restart
Description
Myhostname = mail.postfix.org Specifies the host name to run the Postfix mail system
Myorigin = postfix.org Use this default domain when the sender's information is not detailed
MyDomain = $mydomain The specified domain name, by default Postfix the first part of Myhostname is deleted as MyDomain value
mydestination = $myhostname, localhost. $mydomain, localhost, $mydomain specify where to send mail postfix server is responsible for receiving
Mynetworks = 127.0.0.0/8 Specifies which network segment users are postfix for mail relaying
Inet_interfaces = All
Attention:
(1) In a postfix configuration file, parameter rows and comment lines cannot be in the same row;
(2) The value of any one parameter does not need to be quoted, otherwise, quotation marks will be used as part of the parameter value;
(3) The implementation of Postfix reload after each modification of the parameter and its value will be effected, but if the inet_interfaces is modified, the postfix should be restarted;
(4) If a parameter has more than one value, you can place them in a different row, simply by placing one more space in front of each subsequent row; Postfix the first character as a space or tab text line as the continuation of the previous line;