CentOS/Nginx/SendMail/Dovecat/Perl/OpenWebMail <构架邮件服务器>
2010-10-01 04:57
477 查看
安装Sendmail yum安装或者rpm包安装: yum -y install sendmail sendmail-devel sendmail-cf sendmail-do m4 设置在系统3和5级别启动 #chkconfig –level 35 sendmail on #chkconfig –list sendmail sendmail 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭 #vim /etc/mail/local-host-names //添加邮件服务器的邮件服务域名 xxx.com 开启sendmail服务器的网络接口 #cp sendmail.mc sendmail.mc.bak 为了防止出错,备份配置文件 #vim /etc/mail/sendmail.mc 查 找:DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,’)dnl 修改为:DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0,’)dnl 设置SMTP的用户认证 #vim /etc/mail/sendmail.mc 查找:dnl 52 TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl dnl 53 define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl 去掉前面注释:“dnl” 在sendmail服务器中使用了saslauthd服务程序提供用户认证功能,所以要开启它 #chkconfig –level 35 saslauthd on #service saslauthd start 生成sendmail.cf文件 #cd /etc/mail #m4 sendmail.mc > sendmail.cf #service sendmail restart 用户管理 #groupadd mailuser 建立邮件用户组 #useradd -g mailuser -s /sbin/nologin mike 建立不能登录系统的邮件用户 #vim /etc/aliases sendmail使用aliases机制实现邮件别名和群发功能 admin: mike admin是mike的别名 testgroup: mike,john,tom,jack 邮件群发,向testgroup邮箱发送就是向4个人发送 # newaliases 对aliases.db数据库更新 安装POP3,IMAP功能 #yum install dovecot #vim /etc/dovecot.conf 查 找:protocols = imap imaps 修改为:protocols = imap imaps pop3 pop3s #chkconfig –level 35 dovecot on #service dovecot restart 安装openwebmail 下载所需软件包:www.openwebmail.org www.rpmfind.net yum install perl-CGI-SpeedyCGI perl-suidperl perl-Compress-Zlib perl-Text-Iconv rpm –ivh –nodeps openwebmail-data-2.53-3.i386.rpm rpm –ivh –nodeps openwebmail-2.53-3.i386.rpm 10. 初始化openwebmail系统 #/var/www/cgi-bin/openwebmail/openwebmail-tool.pl –init 11. 修改配置文件 #vim /var/www/cgi-bin/openwebmail/etc/openwebmail.conf domainnames xxx.com default_language zh_CN.GB2312 default_iconset Cool3D.Chinese.Simplified 12. 安装Perl的FastCGI模块 FCGI: http://cpan.wenzk.com/authors/id/F/FL/FLORA/FCGI-0.71.tar.gz #tar zxvf FCGI-0.71.tar.gz #cd FCGI-0.71 #perl Makefile.PL #make && make install #rpm -ivh perl-FCGI-ProcManager-0.18-1.el4.rf.noarch.rpm 或者:yum install perl-FCGI-ProcManager 13. 配置Perl的FastCGI脚本(perl-fast)上传脚本文件到:/etc/init.d/ 目录下 #chmod +x /etc/init.d/perl-fast #vim /etc/profile 添加以下内容: export FCGI_SOCKET_PATH=”/tmp/perl-fastcgi.sock” export FCGI_NPROCESSES=4 #source /etc/profile #/etc/init.d/perl-fast & 14. 上传enable_perl.conf文件到:nginx/conf 目录下,然后为Nginx添加FastCGI的Perl支持server { listen 80; server_name mail.xxx.com; charset gb2312; access_log /wslogs/xxx.com/mail_access.log combined; error_page 404 = http://www.xxx.com/error/404.html; error_page 500 502 503 504 = http://www.xxx.com/error/50x.html; location / { root /var/www; index index.html index.htm index.php; } location ~* .*\.pl$ { root /var/www; include enable_perl.conf; } } 15. 在web服务器中发布openwebmail 为了浏览器中不用输入很长的地址,做一个引导页 #vim /var/www/index.php <script> location.href=”cgi-bin/openwebmail/openwebmail.pl”; </script> 16. 文件权限的设置 #chown root.root /var/www/cgi-bin/openwebmail/ #chown root.mail /var/www/cgi-bin/openwebmail/* #chmod 775 /var/www/cgi-bin/openwebmail/openwebmail*.pl #chown root.mail /var/www/cgi-bin/openwebmail/openwebmail*.pl #chmod 4555 /usr/bin/suidperl #chmod 775 /var/www/cgi-bin/openwebmail/etc/sessions |
相关文章推荐
- CentOS/Nginx/SendMail/Dovecat/Perl/OpenWebMail <构架邮件服务器>
- CentOS/Nginx/SendMail/Dovecat/Perl/OpenWebMail <构架邮件服务器>
- Ubuntu+Sendmail+Dovecot+Openwebmail 邮件服务器搭建完全解决方案
- centos shell基础 alias 变量单引号 双引号 history 错误重定向 2>&1 jobs 环境变量 .bash_history source配置文件 nohup & 后台运行 cut,sort,wc ,uniq ,tee ,tr ,split, paste cat> 2.txt <<EOF 通配符 glob模式 发邮件命令mail 2015-4-8 第十二节课
- sendmail+dovecot+openwebmail做邮件服务器
- sendmail +apache+openwebmail邮件服务器安装配置
- centos5.10 sendmail+openwebmail
- Centos 5.3安装Apache +Sendmail+Openwebmail实用配置http://chinaapp.sinaapp.com/thread-1183-1-1.html
- Red Hat搭建邮件服务器(sendmail+dovecot+openwebmail+procmail)
- Sendmail+Openwebmail 精简快速搭建
- Sendmail+Openwebmail 精简快速搭建
- RedHatLinux AS3中APACHE+SendMail+OpenWebMail整合
- Sendmail+Openwebmail 精简快速搭建
- linux(centos)上配置nginx、mysql、php-fpm、redis开机启动<转>
- Sendmail+Openwebmail 精简快速搭建
- LNMP环境下SendMail+OpenWebMail的详细配置
- linux+postfix+openwebmail+sasl搭建邮件服务器
- zz LAB_RHEL5下sendmail+dovecot+openwebmail邮件系统配置(图片链接已失效 2010/11/08)
- Sendmail+Openwebmail 精简快速搭建
- CentOS下的Docker容器-<nginx下的cache服务>