企业邮件系统-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
# has touched it since our last newaliases call
[ /etc/aliases -nt /etc/aliases.db ] ||
[ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] ||
[ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return
/usr/bin/newaliases
touch -r /etc/aliases.db "$ALIASESDB_STAMP"
else
/usr/bin/newaliases
fi
} start() {
[ "$EUID" != "0" ] && exit 4
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
conf_check
# Start daemons.
echo -n $"Starting postfix: "
make_aliasesdb >/dev/null 2>&1
[ -x $CHROOT_UPDATE ] && $CHROOT_UPDATE
/usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure $"$prog start"
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
echo
return $RETVAL
} stop() {
[ "$EUID" != "0" ] && exit 4
conf_check
# Stop daemons.
echo -n $"Shutting down postfix: "
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop"
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
echo
return $RETVAL
} reload() {
conf_check
echo -n $"Reloading postfix: "
[ -x $CHROOT_UPDATE ] && $CHROOT_UPDATE
/usr/sbin/postfix reload 2>/dev/null1>&2&& success || failure $"$prog reload"
RETVAL=$?
echo
return $RETVAL
} abort(){
conf_check
/usr/sbin/postfix abort 2>/dev/null1>&2&& success || failure $"$prog abort"return $?} flush(){
conf_check
/usr/sbin/postfix flush 2>/dev/null1>&2&& success || failure $"$prog flush"return $?} check(){
conf_check
/usr/sbin/postfix check 2>/dev/null1>&2&& success || failure $"$prog check"return $?}# See how we were called.case"$1"in
start)[ $running -eq 0]&&exit0
start
;;
stop)[ $running -eq 0]||exit0
stop
;;
restart|force-reload)
stop
start
;;
reload)[ $running -eq 0]||exit7
reload
;;
abort)
abort
;;
flush)
flush
;;
check)
check
;;
status)
status -p $pidfile -l $(basename $lockfile)-b /usr/libexec/postfix/master master
;;
condrestart)[ $running -eq 0]||exit0
stop
start
;;*)
echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}"exit2esacexit $?###################################点到为止###################################[root@ipython postfix-2.12-20140801]# chmod 755/etc/init.d/postfix
[root@ipython postfix-2.12-20140801]# service postfix start
Starting postfix:[ OK ]
» 转载保留版权:IT辰逸 » 《邮件系统-Postfix 安装详解》» 本文版权采取:BY-NC-SA 协议进行授权,转载注明出处。除IT-Tools、News以及特别标注,本站所有文章均为原创。» 如果喜欢可以:点此订阅本站
企业邮件系统-Postfix安装使用的更多相关文章
- 搭建完整邮件系统(postfix+dovecot+clamAV+Spamassassin+amavisd-new)
============================ 相关软件: 1. 发送邮件 --- postfix 2. 身份认证 --- sasl2 3. 接收邮件 --- dovecot 4. 防病毒邮 ...
- Linux下开源邮件系统Postfix+Extmail+Extman环境部署记录
一.基础知识梳理MUA (Mail User Agent) MUA 既是"邮件使用者代理人",因为除非你可以直接利用类似 telnet 之类的软件登入邮件主机来主动发出信件,否则您 ...
- postfix 安装配置详解
[ref: http://blog.51yip.com/server/1382.html] [http://blog.chinaunix.net/uid-174325-id-1744019.html] ...
- 企业内部从零开始安装docker hadoop 提纲
下载apache 项目 http://mirror.bit.edu.cn/apache/ 下载 centos 7 安装 盘 iso 大约7G 安装 centos7 copy 光盘盘中的 packag ...
- iOS开发之企业发布无线安装APP
前提是注册成为企业开发者(¥299),申请到证书并安装到本地,可以正常使用Xcode在IOS移动设备上进行Debug. 首先build看是否报错.如无错 执行下一: 执行Product—Archive ...
- Linux服务器---邮件服务postfix安装
安装postfix postfix是一个快速.易于管理.安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器. 1.安装postfix [root@localhost ~]# rpm ...
- ios 7.1企业证书无线安装
ios升级到7.1时,企业证书http服务器发布无线安装不能使用,需要使用https服务器. 测试了几种方式 1.测试时自签名https证书测试无效,提示不能连接到服务器 2.使用dropbox共享连 ...
- iOS7.1企业应用"无法安装应用程序 因为证书无效"的解决方案
今天升级了iOS7.1后发现通过之前的url无法安装企业应用了,一直提示“无法安装应用程序 因为http://xxx.xxx.xxx证书无效”,折腾了一番,终于在StackOverFlow上找到了答案 ...
- 利用用户自己的server、tomcat下的解决iOS7.1企业应用无法安装应用程序 由于证书无效的问题
1.环境 )操作系统:Windows server 2003.Windows server2008 )JDK:jdk 1.6 )apache-tomcat-6.0.35(注意版本号号,版本号6.0.1 ...
随机推荐
- C文件操作的语言fgets()
谈fgets(..)功能. 原型 char * fgets(char * s, int n,FILE *stream); 參数: s: 字符型指针.指向存 ...
- VirtualBox,Kernel driver not installed (rc=-1908)
http://hi.baidu.com/spt_form/item/316d6207b47b8ee03499020a VirtualBox,Kernel driver not installed (r ...
- 14.5.4 InnoDB File-Per-Table Tablespaces 每个表一个文件
14.5.4 InnoDB File-Per-Table Tablespaces 每个表一个文件 从历史上看, 所有的InnoDB 表和索引是存储在system 表空间, 这个整体的方法是针对机器专注 ...
- 后缀数组--可重叠的K次最长重复子串(POJ3261)
题目:Milk Patterns #include <stdio.h> #include <string.h> #define N 1000010 int wa[N],wb[N ...
- 慕尼黑大学公开课 Competitive Strategy(竞争策略)总结
第一章博弈 同时的博弈:双方同时定制策略 如果有显著的次优策略总是不如另一个,则剔除它. 如果一个策略组合中没有一方可以单独改变其策略以提高回报,则称为Nash均衡.一个游戏可能没有也可能有多个Nas ...
- [置顶] iframe使用总结(实战)
说在前面的话,iframe是可以做很多事情的. 例如: a>通过iframe实现跨域; b>使用iframe解决IE6下select遮挡不住的问题 c>通过iframe解决Ajax的 ...
- JavaEE session机制
JavaEE session机制 Http协议: 在讲session之前,必须说下Http协议,HTTP是一个client和server端请求和应答的标准(TCP).由HTTPclient发起一个请求 ...
- 开发指南专题4:JEECG高速微云开发平台--JEECG开发环境的搭建
开发指南专题4:JEECG微云高速开发平台开发环境搭建 1. JEECG开发环境搭建 JEECG推荐的开发环境为Myeclipse8.5/Eclipse3.7+JDK1.6+Tomcat6.0 1.1 ...
- c#事件委托
转载地址:http://www.cnblogs.com/wudiwushen/archive/2010/04/20/1703368.html 从序言中,大家应该对委托和事件的重要性有点了解了吧, ...
- PHP, Python, Node.js 哪个比较适合写爬虫?
PHP, Python, Node.js 哪个比较适合写爬虫? 1.对页面的解析能力2.对数据库的操作能力(mysql)3.爬取效率4.代码量推荐语言时说明所需类库或者框架,谢谢.比如:python+ ...