企业邮件系统-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 ...
随机推荐
- java中synchronized的使用方法与具体解释
Java语言的keyword.当它用来修饰一个方法或者一个代码块的时候,可以保证在同一时刻最多仅仅有一个线程运行该段代码. 一.当两个并发线程訪问同一个对象object中的这个synchronized ...
- 辛星与您解读PHP页面跳转的几种实现方式
因为页面跳转的使用是很频繁的,因此这里给出几种方式,事实上我想我并没有归纳全,毕竟函数那么多,要一下想起来还是特别麻烦的,于是,想到哪里就记到哪里把,等着以后再整理汇总. 第一种方式就是使用heade ...
- inline与lnk2001、lnk2019,鸡肋?
inline函数居然出现了lnk2001.lnk2019,先贴代码. a.h #pragma once class A { public: inline void foo(); void us ...
- go(一)变量
package main import ( "fmt" ) func main() { var a int a = var a1 string a1 = "my is a ...
- USM锐化之openCV实现,附赠调整对比度函数
源地址:http://www.cnblogs.com/easymind223/archive/2012/07/03/2575277.html 常用Photoshop的玩家都知道Unsharp Mask ...
- 【iOS发展-44】通过案例谈iOS重构:合并、格式化输出、宏观变量、使用数组来存储数据字典,而且使用plist最终的知识
我们今天的情况下是第一个例子,下面的5一来通过切换页上一页下一页: (1)第一步,基本是以非常傻非常直接的方式来创建.这里用到的主要点有: --把对象变量设置为全局变量使得能够在其它方法中调用来设置它 ...
- 人脸对齐ASM-AAM-CLM的一些总结
源地址:http://blog.csdn.net/piaomiaoju/article/details/8918107 ASM算法相对容易,其中STASM是目前正面脸当中比较好的算法,原作者和CLM比 ...
- poj 2409+2154+2888(Burnside定理)
三道burnside入门题: Burnside定理主要理解置换群置换后每种不动点的个数,然后n种不动点的染色数总和/n为answer. 对于旋转,旋转i个时不动点为gcd(n,i). 传送门:poj ...
- C语言编写的bmp读写程序
C语言编写的bmp读写程序 建议先把bmp的数据存储格式了解下 <span style="font-size:16px;">#include "Windows ...
- 更改Oracle实例的字符集
(1).数据库服务器字符集select * from nls_database_parameters 来源于props$,是表示数据库的字符集. (2).服务端字符集环境select * from n ...