企业邮件系统-Postfix安装使用

Postfix是目前流行的一套邮件传输代理软件(MTA),其作者Wietst Venema最初开发这套软件时就对总体设计、扩展能力、可用性及系统安全等方面进行了充分的考虑。由于Postfix在稳定、效率、安全和可用性上的优势,使得很多大型的邮件服务提供商都从原有的MTA软件向Postfix过度,而新仅诞生的邮件产品也大多采用了Postfix。网易、Tom和新浪都将原有的Qmail更换为Postfix,可见Postfix在大规模邮件系统中有比较普遍的应用,当然,Postfix也完全适用设计中小型的邮件系统,因为Postfix在保证了效率、安全、扩展等方面优势的同时,还具有配置简单的特点。[比较老的数据了]

 

碎语:

又开始捣腾我比较喜欢的邮件系统了,本文为后面的邮件系统做铺垫,后面在来关联文章树,本文LNMP环境基于LNMP一键安装,请自行通过博客搜索功能搜索该关键词

 

基于CentOS6.5,环境minimal,卸载postfix

[root@ipython ~]# service postfix stop
Shutting down postfix: [ OK ] [root@ipython ~]# rpm -e --nodeps postfix

 

安装Postfix

[root@ipython ~]# yum install db4-devel [root@ipython ~]# tar zxf postfix-2.12-20140801.tar.gz [root@ipython ~]# cd postfix-2.12-20140801 ####直接编译Makefiles#### ###AUX = 扩展功能[就这理解着吧] -lz = 压缩工具 -lm = 编码支持 #### ####lssl = openssl加密支持 lcrypto = crypto库 #### ###如果你参考了本文,请不要看别的文章,并且最好使用我打包好的免安装LNMP或一键安装LNMP做完一次完整的测试后,再尝试跟着你自己的感觉走哦### ###当然,如果你仍采用了自己的思路并参考了本文,那么请修改下面的依赖文件的路径,欢迎提问### [root@ipython postfix-2.12-20140801]# make makefiles CCARGS='-DHAS_MYSQL -I/software/mysql/include/mysql -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS -I/software/openssl/include' AUXLIBS='-L/software/mysql/lib/mysql/ -lmysqlclient -lz -lm -L/software/openssl/lib/ -lssl -lcrypto' [root@ipython postfix-2.12-20140801]# make ###给权限哦### [root@ipython postfix-2.12-20140801]# chmod a+x postfix-install [root@ipython postfix-2.12-20140801]# ./postfix-install -non-interactive install_root=/ tempdir=/tmp config_directory=/etc/postfix command_directory=/usr/sbin/ daemon_directory=/software/postfix data_directory=/var/lib/postfix html_directory=no mail_owner=postfix mailq_path=/usr/bin/mailq manpage_directory=/usr/local/man newaliases_path=/usr/bin/newaliases queue_directory=/var/spool/postfix readme_directory=no sendmail_path=/usr/sbin/sendmail setgia_group=postdrop

 

Postfix自动启动

###postfix 启动脚本可以参考 blfs-bootscripts 包,依赖redhat-lsb,由于太大,这里放弃###

---手动建立---
---------------------/etc/init.d/postfix--------------------------- #!/bin/bash # # postfix Postfix Mail Transfer Agent # # chkconfig: 2345 80 30 # description: Postfix is a Mail Transport Agent, which is the program \ # that moves mail from one machine to another. # processname: master # pidfile: /var/spool/postfix/pid/master.pid # config: /etc/postfix/main.cf # config: /etc/postfix/master.cf # # Based on startup script from Simon J Mudd <sjmudd@pobox.com> # 25/02/99: Mostly s/sendmail/postfix/g by John A. Martin <jam@jamux.com> # 23/11/00: Changes & suggestions by Ajay Ramaswamy <ajayr@bigfoot.com> # 20/01/01: Changes to fall in line with RedHat 7.0 style # 23/02/01: Fix a few untidy problems with help from Daniel Roesen. ### BEGIN INIT INFO # Provides: postfix MTA # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop postfix # Description: Postfix is a Mail Transport Agent, which is the program that  # moves mail from one machine to another. ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network RETVAL=0 prog="postfix" lockfile=/var/lock/subsys/$prog pidfile=/var/spool/postfix/pid/master.pid ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp # Script to update chroot environment CHROOT_UPDATE=/etc/postfix/chroot-update status -p $pidfile -l $(basename $lockfile) -b /usr/libexec/postfix/master master >/dev/null 2>&1 running=$? conf_check() { [ -x /usr/sbin/postfix ] || exit 5 [ -d /etc/postfix ] || exit 6 [ -d /var/spool/postfix ] || exit 5 } make_aliasesdb() { if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ] then # /etc/aliases.db may be used by other MTA, make sure nothing 

转载于:https://www.cnblogs.com/i-it/p/3936162.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值