CentOSpostfix的安装创建方法

这篇文章主要介绍“CentOS postfix的安装创建方法”,在日常操作中,相信很多人在CentOS postfix的安装创建方法问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS postfix的安装创建方法”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

我们提供的服务有:成都网站制作、网站设计、外贸网站建设、微信公众号开发、网站优化、网站认证、宜春ssl等。为上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的宜春网站制作公司

A、CentOS postfix下载软件包
[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
编辑postfix.spec 修改下面的选项
%define distribution rhel-5.0
%define with_MySQL_redhat 1
%define with_sasl         2
%define with_vda          1

B、CentOS postfix安装创建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安装切换mta
[root@localhost i386]# alternatives --config mta (选择2,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安装配置
[root@localhost ~]# cd /etc/postfix/
[root@localhost postfix]# mv main.cf main.cf.bak
[root@localhost postfix]# vim main.cf
输入下面的内容:
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 = 550
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

复制extman/docs 目录的cf 文件到/etc/postfix
[root@localhost postfix]# cp /root/extman-0.2.5b1/docs/mysql_virtual_* .
因为CentOS postfix安装配置文件的用户、密码与数据库时一样,所以不用修改。
[root@localhost postfix]# service postfix start

到此,关于“CentOS postfix的安装创建方法”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!


当前名称:CentOSpostfix的安装创建方法
网站路径:http://lszwz.com/article/ppossd.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款