Analysis of post fix and post fix in Linux

Source: Internet
Author: User

Analysis of post fix and post fix in Linux

Postfix is the mainstream mail server in Linux, that is, MTA, which is mainly used to implement the SMTP protocol. It is compatible with sendmail, and postfix is created to improve sendmail.

Generally, postfix has the following advantages over sendmail: ① the speed is faster. Generally, it is three times faster. ② It is more stable and robust. ③ The configuration is more flexible and simple. ④ Most postfixes run with lower permissions, making them more secure. ⑤ Compatible with sendmail.

In the CentOS6 series, postfix is installed by default and started upon startup. It is located at/etc/postfix, and the main configuration file address is/etc/postfix/main. cf.

Of course, you can also use service postfix start to start it, or you can use chkconfig postfix on to set it to boot, or you can use chkconfig -- list | grep postfix to plug in his situation.

To send an email, we can use the mail-s "topic" name followed by the body content. You can use @ to connect to the host name. If it is a local machine, you can leave it empty, the email is saved at/var/spool/mail/user name. You can use the mail command to view the email.

We use the postconf command to modify the configuration file to avoid manual modification. We can use postconf-d to display the default configuration of postfix, and d is the first character of default, we use postconf-n to display the current configuration of postfix. n is the first character of now. We use postconf-d key = value to specify the attribute value, and e is the first character of edit.

In the configuration item, mydomain = xin.com is a domain name, myhostname = mail.xin.com is a host name, And inet_interface = all is a listener for all interfaces, while mydestination = $ myhostname, localhost, $ mydomain is an acceptable email, while mynetwork = 127.0.0.0/8 is a network user without authentication, and myorigin = $ mydomain is used for disguise.

Generally, postfix listens to the local loopback interface by default, that is, the local service, so that it listens to all interfaces to provide external services, that is, it uses postconf-e "inet_interface = all" to set. We can disguise "username @ host name" as "username @ Domain Name". We use postconf-e "myorigin = $ mydomain" to set it.

We can use postqueue-p to view the current mail sending queue, we can use postqueue-f to refresh the current mail sending queue. We can use tail-f/var/log/maillog to view the log file.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.