linux-postfix邮件系统架设全攻略
	一、安装前的准备工作:
	1、安装所需的rpm包,这包括以下这些:
	httpd, php, php-mysql, mysql, mysql-server, mysql-devel, openssl-devel, dovecot, perl-DBD-MySQL, tcl, tcl-devel, libart_lgpl, libart_lgpl-devel, libtool-ltdl, libtool-ltdl-devel, expect
	 
	2、关闭sendmail,并将它的随系统自动启动功能关闭:
	# service sendmail stop
	# chkconfig sendmail off
	 
	3、安装以下开发所用到的rpm包组:
	Development Libraries
	Development Tools
	Legacy Software Development
	X Software Development
	方法:
	# yum groupinstall "packge_group_name"
	 4、启动mysql数据库,并给mysql的root用户设置密码:
	# service mysqld start
	# chkconfig mysqld on
	# mysqladmin -uroot password 'your_password'
	   
	 5、启动saslauthd服务,并将其加入到自动启动队列:
	# service saslauthd start
	# chkconfig saslauthd on
	   
	 
	二、安装配置postfix
	# groupadd -g 2525 postfix   
	# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix
	# groupadd -g 2526 postdrop
	# useradd -g postdrop -u 2526 -s /bin/false -M postdrop
	# tar zxvf postfix-2.6.5.tar.gz
	# cd postfix-2.6.5
	# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH    -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'
	# make
	# make install
	 
	按照以下的提示输入相关的路径([]号中的是缺省值,”]”后的是输入值,省略的表示采用默认值)
	   install_root: [/] /
	  tempdir: [/usr/local/src/ postfix-2.6.5] /tmp
	  config_directory: [/etc/postfix] /etc/postfix
	  daemon_directory: [/usr/libexec/postfix]
	  command_directory: [/usr/sbin]
	  queue_directory: [/var/spool/postfix]
	  sendmail_path: [/usr/sbin/sendmail]
	  newaliases_path: [/usr/bin/newaliases]
	  mailq_path: [/usr/bin/mailq]
	  mail_owner: [postfix]
	  setgid_group: [postdrop]  
	    html_directory: [no] /var/www/postfix_html
	    manpages: [/usr/local/man]
	    readme_directory: [no]
	 
	生成别名二进制文件,这个步骤如果忽略,会造成postfix效率极低:
	#    newaliases
	 
	 2.进行一些基本配置,测试启动postfix并进行发信
	# vi /etc/postfix/main.cf
	修改以下几项为您需要的配置
	myhostname = mail.test.com
	myorigin = test.com
	mydomain = test.com
	mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
	mynetworks = 192.168.1.0/24, 127.0.0.0/8
	 
	-------------------------------------------------------------------------------------------
	说明
	myorigin     : 参数用来指明发件人所在的域名;
	
- 发表评论
- 
				
- 最新评论 进入详细评论页>>







