Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and creation method of CentOS postfix

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the installation and creation method of CentOS postfix". In the daily operation, I believe that many people have doubts about the installation and creation method of CentOS postfix. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about the installation and creation method of CentOS postfix. Next, please follow the editor to study!

A, CentOS postfix download software package

[root@localhost i386] # cd

[root@localhost ~] # wget http://ftp.wl0.org/official/2.5/SRPMS/postfix-2.5.4-2.src.rpm

[root@localhost] # rpm-ivh postfix-2.5.4-2.src.rpm

[root@localhost ~] # cd $SPEC

Edit postfix.spec to modify the following options

% define distribution rhel-5.0

Define with_mysql_redhat 1

% define with_sasl 2

Define with_vda 1

B, CentOS postfix installation to create rpm

[root@localhost SPECS] # rpmbuild-bb postfix.spec

[root@localhost RPMS] # cd $RPMS/i386

[root@localhost i386] # rpm-ivh postfix-2.5.4-2.rhel4.i386.rpm

C, CentOS postfix installation switch mta

[root@localhost i386] # alternatives-- config mta (select 2Mae Postfix)

[root@localhost i386] # rpm-e sendmail

[root@localhost i386] # cd / usr/sbin/

[root@localhost sbin] # mv sendmail sendmail.bak

[root@localhost sbin] # newaliases

[root@localhost sbin] # ln-s sendmail.postfix sendmail

D, CentOS postfix installation configuration

[root@localhost ~] # cd / etc/postfix/

[root@localhost postfix] # mv main.cf main.cf.bak

[root@localhost postfix] # vim main.cf

Enter the following:

Queue_directory = / var/spool/postfix

Command_directory = / usr/sbin

Daemon_directory = / usr/libexec/postfix

Data_directory = / var/lib/postfix

Mail_owner = postfix

Unknown_local_recipient_reject_code = 5505

Debug_peer_level = 2

Debugger_command =

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

Ddd $daemon_directory/$process_name $process_id & sleep 5

Sendmail_path = / usr/sbin/sendmail.postfix

Newaliases_path = / usr/bin/newaliases.postfix

Mailq_path = / usr/bin/mailq.postfix

Setgid_group = postdrop

Html_directory = / usr/share/doc/postfix-2.5.2-documentation/html

Manpage_directory = / usr/share/man

Sample_directory = / etc/postfix

Readme_directory = / usr/share/doc/postfix-2.5.2-documentation/readme

Alias_database = hash:/etc/postfix/aliases

Alias_maps = hash:/etc/postfix/aliases

Myhostname = mail.yiyou.org

Mydomain = yiyou.org

Mydestination = $myhostname

Smtpd_banner = yiyou.org ESMTP Mail System

Message_size_limit = 14680064

Virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

Virtual_mailbox_base = / home/data/domains

Virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf

Virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

Virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_limit_maps.cf

Virtual_transport = maildrop:

Maildrop_destination_recipient_limit = 1

# sasl

Smtpd_sasl_auth_enable = yes

Smtpd_sasl2_auth_enable = yes

Smtpd_sasl_security_options = noanonymous

Broken_sasl_auth_clients = yes

Smtpd_recipient_restrictions =

Permit_mynetworks

Permit_sasl_authenticated

Reject_unauth_destination

Reject_unauth_pipelining

Reject_invalid_hostname

Copy the cf file of the extman/docs directory to / etc/postfix

[root@localhost postfix] # cp / root/extman-0.2.5b1/docs/mysql_virtual_*.

Because CentOS postfix installs the configuration file with the same user and password as when it was in the database, it does not need to be modified.

[root@localhost postfix] # service postfix start

At this point, the study on the "installation and creation method of CentOS postfix" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report