CentOS 6.0安装Postfix+Dovecot+Sasl+OpenWebMail+Httpd+Bind(3)

最后配置openwebmail
vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
# in cgi-bin/openwebmail/etc/defaults/openwebmail.conf
domainnames                     linuxidc.com
default_language                zh_CN.GB2312
default_timeoffset              +0800
default_iconset                Cool3D.Chinese.Simplified
auth_module                     auth_unix.pl
mailspooldir                    /var/spool/mail
ow_cgidir                       /var/www/cgi-bin/openwebmail
ow_cgiurl                       /cgi-bin/openwebmail
ow_htmldir                      /var/www/data/openwebmail
ow_htmlurl                      /data/openwebmail
logfile                         /var/log/openwebmail.log

cat /var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf
# host dependent configuration
##############################################################################
domainnames             linuxidc
smtpserver              192.168.40.40
authpop3_server         192.168.40.40
smtpport                25
smtpauth                no
virtusertable           /etc/mail/virtusertable
auth_module             auth_unix.pl
auth_withdomain         no
auth_domain             auto
quota_module            none
[root@linuxidc ~]# cd /var/www/cgi-bin/openwebmail/切换到openwebmail目录
[root@linuxidc openwebmail]# ./openwebmail-tool.pl --init//安装openwebmail
Send the site report?(Y/n) Y
sending report...
Thank you.
因为是rpm装的ScriptAlias的配置已经自动添加了,装了openwebmail之后记得重启httpd。
浏览即可。本人在xp上就是
直接用系统账号登
 
最后配置bind域名服务
 
[root@linuxidc dovecot]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
        listen-on port 53 { any; };//任何人
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { 0.0.0.0/0; };任意ip
        recursion yes;
        forward only;
        forwarders{ 202.101.172.35;};//打开转发dns功能
       
        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;
        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
        type hint;
        file "named.ca";
};
include "/etc/named.rfc1912.zones";
 
[root@linuxidc dovecot]# cat /etc/named.rfc1912.zones //查看区域文件。
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
        type master;
        file "named.localhost";
        allow-update { none; };
};
zone "localhost" IN {
        type master;
        file "named.localhost";
        allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.loopback";
        allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
        type master;
        file "named.loopback";
        allow-update { none; };
};
zone "0.in-addr.arpa" IN {
        type master;
        file "named.empty";
        allow-update { none; };
};
zone "linuxidc.com" IN {           
type master;                     //写一个正向区域文件linuxidc.com
file "linuxidc.com";               
allow-update { none; };
};

[root@linuxidc dovecot]# cat /var/named/linuxidc.com //写一个正向区域文件内容如下:
$TTL 1D
@ IN   SOA  linuxidc.com. root.linuxidc.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
                   
 NS @
 A  127.0.0.1
 AAAA ::1
www    IN   A    192.168.40.40
mail   IN   A    192.168.40.40 //创建a记录mail
mail   IN   MX 10  mail.linuxidc.com //设置邮件交换。


[root@linuxidc openwebmail]# tail -F /var/log/maillog //查看maillog文件。
Apr  2 00:01:11 linuxidc postfix/smtpd[32742]: disconnect from linuxidc.com[192.168.40.40]
Apr  2 00:01:11 linuxidc postfix/local[32746]: 09B69808DD: to=<linuxidc@linuxidc.com>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Apr  2 00:01:11 linuxidc postfix/qmgr[32570]: 09B69808DD: removed
Apr  2 00:13:49 linuxidc postfix/smtpd[32767]: connect from linuxidc.com[192.168.40.40]
Apr  2 00:13:49 linuxidc postfix/smtpd[32767]: 52DA9808DD: client=linuxidc.com[192.168.40.40]
Apr  2 00:13:49 linuxidc postfix/cleanup[303]: 52DA9808DD: message-id=<20120401161336.M87645@linuxidc.com>
Apr  2 00:13:49 linuxidc postfix/qmgr[32570]: 52DA9808DD: from=<foxmail@linuxidc.com>, size=762, nrcpt=1 (queue active)
Apr  2 00:13:49 linuxidc postfix/smtpd[32767]: disconnect from linuxidc.com[192.168.40.40]
Apr  2 00:13:49 linuxidc postfix/local[304]: 52DA9808DD: to=<linuxidc@linuxidc.com>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Apr  2 00:13:49 linuxidc postfix/qmgr[32570]: 52DA9808DD: removed

遇到的问题
 linuxidc postfix/local[2393]: E7D5281967: to=<test@linuxidc.com>, relay=local, delay=0.11, delays=0.02/0.05/0/0.04, dsn=4.3.0, status=deferred (temporary failure. Command output: local: fatal: execvp /usr/bin/procmail: No such file or directory ) 没有/usr/bin这个目录在main.cf中去掉即可。
 
Apr  2 00:15:53 linuxidc dovecot: pop3-login: Disconnected (tried to use disabled plaintext auth): rip=192.168.40.41, lip=192.168.40.40//在dovecot.conf中添加disable_plaintext_auth = no参数

Apr  5 22:21:49 linuxidc dovecot: imap-login: Disconnected (auth failed, 1 attempts): user=<linuxidc@linuxidc.com>, method=PLAIN, rip=192.168.40.41, lip=192.168.40.40
Apr  5 22:21:49 linuxidc dovecot: imap-login: Disconnected (auth failed, 1 attempts): user=<linuxidc@linuxidc.com>, method=PLAIN, rip=192.168.40.41, lip=192.168.40.40
Apr  5 22:21:49 linuxidc dovecot: imap-login: Disconnected (auth failed, 1 attempts): user=<linuxidc@linuxidc.com>, method=PLAIN, rip=192.168.40.41, lip=192.168.40.40
    用foxmail测试是正常的,但是接收文件的时候虽然提示完成,但是没有接收下来,不知道为什么?但是为什么会断开连接,auth错误,到底是什么地方出现问题,还是foxmail根本就用不了,还是自己配置dovecot.conf文件出错,希望网友提出宝贵的意见。自己也查询了互联网别人说可能用rpm软件包安装就会出现这个问题,要用tar.gz包编译安装就不会出现这个问题,但是也不十分肯定。

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/48196e7a3fefd3836f1d6d1b193969ac.html