- 论坛徽章:
- 0
|
想要自己架设邮件服务器吗?如果sendmail让你头痛万分,现在你有更好的选择 —— Postfix。Postfix是目前比较流行的,拥有相当好的安全性和高效率的邮件系统。Postfix是一个由IBM资助下由Wietse Venema 负责开发的一个自由软件工程产物,其目的是为用户提供除Sendmail之外的邮件服务器选择。Postfix自身带了很多反垃圾邮件的功能,比sendmail更快,兼容性更好,更健壮,更灵活,更安全。使它广受专家的好评与赞赏。Postfix也是许多新手的第一选择,因为它太容易架设了!
安装Postfix
rpm –ivh Postfix-2.1.5-4.2.RHEL4.rpm
可到http://www.postfix.org 下载最新源码包或到安装光盘复制
Postfix配置重要文件:
/etc/rc.d/init.d/postfix(执行文件)
/usr/sbin/postfix(启动文件)
/etc/postfix/main.cf(配置文件)
/etc/postfix/aliase(别名文件)
/etc/postfix/access(访问控制文件)
/var/log/maillog(日志文件)
Postfix配置步骤:
配置一个域名,jinlai.com
域名中配置一条MX记录、PTR记录
激活postfix服务
alternatives –set mta /usr/sbin/sendmail.postfix
修改/etc/postfix/main.cf文件
修改别名文件/etc/postfix/aliase
修改/etc/postfix/access文件
启动postfix服务service postfix start
配置pop3服务,并启动
客户端测试,采用webmail,foxmail,kmail等
如果你的系统上原来有sendmail,先将其停止:
# /etc/init.d/sendmail stop
# chkconfig --level 0123456 sendmail off
设置Mysql和Apache自动启动
[root@localhost tmp]# chkconfig --level 35 mysqld on
[root@localhost tmp]# chkconfig --level 35 httpd on 编辑/etc/postfix/main.cf 为以下内容queue_directory = /var/spool/postfixcommand_directory = /usr/sbindaemon_directory = /usr/libexec/postfixmail_owner = postfixmyhostname = jinlai.com mydomain = jinlai.commyorigin = mail@jinlai.com mtpd_client_restrictions = check_client_access hash:/etc/postfix/accessinet_interfaces = allmydestination = $myhostname, localhost.$mydomain, localhost, www.$mydomain, mail.$mydomain, $mydomainunknown_local_recipient_reject_code = 550mynetworks = 10.0.2.0/24, 127.0.0.0/8alias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliasesdebug_peer_level = 2debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5sendmail_path = /usr/sbin/sendmail.postfixnewaliases_path = /usr/bin/newaliases.postfixmailq_path = /usr/bin/mailq.postfixsetgid_group = postdrophtml_directory = nomanpage_directory = /usr/share/mansample_directory = /usr/share/doc/postfix-2.1.5/samplesreadme_directory = /usr/share/doc/postfix-2.1.5/README_FILESmailbox_transprot=lmtp:unix:/var/lib/imap/socket/lmtpunix-0.lock
编辑 /etc/dovecot.conf 为以下内容
protocols = imap pop3imap_listen = *pop3_listen = *login_dir = /var/run/dovecot-loginlogin = imaplogin = pop3mbox_locks = fcntlauth = defaultauth_mechanisms = plainauth_userdb = passwdauth_passdb = pamauth_user = root 启动Dovecot 服务
# service dovecot start
# chkconfig --level 35 dovecot on测试端口是否生效netstat –anpt |grep :110 启动cyrus-imapd服务service cyrus-imapd start 安装SquirrelMailrpm –ivh SquirrelMail-1.4.3a-9.EL4.noarch.rpm可到http://www.squirrelmail.org 官方站下载最新版本或从安装光盘复制 配置SquirrelMail的IAMP服务器:/usr/share/squirrelmail/config/config.pl输入D->cyrus->回车配置SquirrelMail的缺省语言:主菜单2->1->输入域名”jinlai.com”- >回车->3->2->回车->r(返回主菜单)配置SquirrelMail的缺省字符集和用户名用小写字母:主菜单4->1->输入gd2312->回车->6->Y->回车->r(返回主菜单)保存配置:主菜单->s->回车创建SquirrelMail别名vi /etc/httpd/conf.d/squirrelmail.conf添加alias /wemail /usr/share/squirrelmail配置SquirrelMail完成后,用浏览器访问
http://localhost/webmail
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/25799/showart_203099.html |
|