Postfix is intended for a wide range of Internet users, trying to affect most Internet email systems, so it is free of charge. Let's take a look at the specific implementation of Postfix mail.
1. Obtain the source code package of the Postfix via the postfix email
From postfix official site www.postfix.orgget the source code package postfix-20171231-pl08.tar.gz of postfix. Copy it to/tmp
2. the Postfix mail unlocks the source code package and will generate the/tmp/postfix-19991231-pl08 directory.
Tar xvzf postfix-19991231-pl08.tar.gz
3. Compile the source code package through Postfix mail
Postfix-19991231-pl08 make cd/tmp/
4. create a new user "postfix". The user must have a unique user ID and group ID, and the user must not be logged on to the system, that is, the executable Login Shell and the available user's home directory are not specified for this user. We can add a user with adduser postfix before editing related entries in the/etc/passwd file as follows:
Postfix: *: 12345: 12345: postfix:/no/where:/no/shell
5. Make sure that the/etc/aliases file contains the following entries:
Postfix: root
6. Log On As A root user and execute the command in the/tmp/postfix-19991231-pl08 directory:
./INSTALL. sh
7. Start the Postfix email
# Postfix start
8. Description of maildrop directory permissions:
Postfix can use maildrop, which can be written by all users, that is, the directory permission is 1773.
Directory to allow local users to submit emails. This method avoids the use of set-uid or set-gid software. When the email system is unavailable, you can still submit emails. Other users are not authorized to access the queue files in this directory. When receiving emails from the network, the postfix does not use the maildrop directory. However, because the permission for this directory is 733, other users can create a file that is hard connected to the directory, resulting in the mail being shipped multiple times or cannot be deleted, that is, this will cause security issues. If you want to use this method to allow users to submit emails, you need to answer no when the INSTALL. sh script asks if you need set-gid.
If your system has multiple users, you 'd better cancel the preceding method and use the set-gid user permission to submit emails. At this time, we first need to create a group with a unique group id "maildrop" and make sure that there are no user members in the group. Then, INSTALL. sh and ask if you want to specify "maildrop" when set-gid is required ".
Tip: before installing postfix, delete the installed sendmail.