Configure the system to automatically start postfix upon each startup

Source: Internet
Author: User
Tags mysql backup

Do you want to set up an email server on your own? If sendmail is a headache for you, you have a better option-Postfix. The secure structure design and excellent reliability make it widely praised and appreciated by experts. Next let's take a look at the specific installation process of the postfix mail server. The following describes how to start postfix.
I. Installation of source code packages
1. Get the source code package of postfix
From postfixofficial site www.postfix.orgto obtain the source code package postfix-20171231-pl08.tar.gz of postfix. Copy it to/tmp

2. Undo the source code package and the/tmp/postfix-19991231-pl08 directory will be generated. Tarxvzfpostfix-19991231-pl08.tar.gz

3. Compile the source code package, cd/tmp/postfix-19991231-pl08make

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. You can add a user with adduserpostfix and then edit 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 run the command:./INSTALL. sh in the/tmp/postfix-19991231-pl08 directory

7. Start postfix # postfixstart

8. Description of maildrop directory permissions:
Postfix can use a maildrop directory that all users can write, that is, the directory permission is 1773) 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
Creating a hard connection to a file in the directory causes the email to be shipped multiple times or cannot be deleted, which leads to 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.
Ii. Installation of rpm packages
1. Get the rpm package of postfix. We can use the rpmsoftware package of http://www.alltrading.es/postfix/rpms/ I #/?postfix. The latest version is the postfix-20000531-2.i386.rpm.
2. Back up your/etc/aliases and/etc/aliases. db, because the postfix uses this alias database.
3. Run the following command to check if sendmail is installed: [root @ mail/root] # rpm-qa | grepsendmailsendmail-doc-8.9.3-15sendmail-8.9.3-15sendmail-cf-8.9.3-15
4. Run the following command to forcibly uninstall sendmail: [root @ mail/root] # rpm-esendmailsendmail-cfsendmail-doc -- nodeps
5. Run the following command to kill the Running sendmail process: [root @ mail/root] # killallsendmail
6. Install postfix:
[Root @ mail/root] # rpm-Uvhpostfix-20000531-2.i386.rpm
Postfix ####################################### ###########
Postfix-script: warning: creatingmissingPostfixpiddirectory
Postfix-script: warning: creatingmissingPostfixincomingdirectory
Postfix-script: warning: creatingmissingPostfixactivedirectory
Postfix-script: warning: creatingmissingPostfixbouncedirectory
Postfix-script: warning: creatingmissingPostfixdeferdirectory
Postfix-script: warning: creatingmissingPostfixdeferreddirectory
Postfix-script: warning: creatingmissingPostfixsaveddirectory
Postfix-script: warning: creatingmissingPostfixcorruptdirectory
Postfix-script: warning: creatingmissingPostfixpublicdirectory
Postfix-script: warning: creatingmissingPostfixprivatedirectory
[Root @ mail/root] #
7. Start postfix
[Root @ mail/root] #/etc/rc. d/init. d/postfixstart
3. Configure the system to automatically start postfix upon each startup
1. if you have installed the source code package of postfix, you can go to/etc/rc. d/rc. add the following statement to the local file to enable the system to automatically start postfix upon each startup: [f/usr/libexec/postfix]; then/usr/libexec/postfixstartfi
2. If you have installed the postfix rpm package, you can use the setup command to set the postfix to be started at system startup.

  1. Summary of basic MySQL database backup knowledge
  2. What are common MySQL skills?
  3. Description of commands in the MySQL database
  4. Practical application of MySQL escape characters
  5. How to Use PHP to implement MySQL backup?

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.