sendmaild的安装与配置
1.所需软件
sendmail-8.13.1-2 主文件
m4-1.4.1-16 配置工具
sendmail-cf 配置文件
sendmail-doc 说明文件
sendmail-8.13.1-2 主文件
m4-1.4.1-16 配置工具
sendmail-cf 配置文件
sendmail-doc 说明文件
2.设置sendmail服务自动启动
chkconfig --list sendmail
chkconfig --level 35 sendmail on
3.配置dns服务器
1)vi /etc/named.conf
添加:
zone "test.com" IN {
type master;
file "test.com";
};
1)vi /etc/named.conf
添加:
zone "test.com" IN {
type master;
file "test.com";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "test.com.arpa";
};
2)
cd /var/named/chroot/var/named
cp localhost.zone test.com
vi test.com
添加如下内容:
@ IN MX 5 rhel.test.com.
rhel IN A 192.168.1.1
3) cp test.com test.com.arpa
vi test.com.arpa
添加:
1 IN PTR rhel.test.com.
4)service named start
chkconfig --level 35 named on
type master;
file "test.com.arpa";
};
2)
cd /var/named/chroot/var/named
cp localhost.zone test.com
vi test.com
添加如下内容:
@ IN MX 5 rhel.test.com.
rhel IN A 192.168.1.1
3) cp test.com test.com.arpa
vi test.com.arpa
添加:
1 IN PTR rhel.test.com.
4)service named start
chkconfig --level 35 named on
4.启动服务
sevice sendmail start
sevice sendmail start
5.sendmail文件路径 /etc/mail
6.vi sendmail.mc
修改Daemon_Options=port=smtp,addr=0.0.0.0,Name=MTA
修改Daemon_Options=port=smtp,addr=0.0.0.0,Name=MTA
7.m4 sendmail.mc > sendmail.cf
8.重启服务,使配置生效 service sendmail restart
9.vi /etc/mail/access
添加:
192.168.1.0 RELAY
添加:
192.168.1.0 RELAY
10.makemap hash access.db < access
11.vi local-host-names
添加域名: test.com
添加域名: test.com
12.service sendmail restart
13.用户管理
(1)启用stmp身份验证
vi /etc/mail/sendmail.mc
修改48,49行
把这两行前边的dnl去掉
(2)确保saslauthd服务正常运行
chkconfig --list saslauthd
service saslauthd start
(3)用户账号
groupadd mailgroup
useradd -g mailgroup -s /sbin/nologin mike
useradd -g mailgroup -s /sbin/nologin john
passwd mike
passwd john
(4)设置邮件别名
vi /etc/aliases
加入:
admin: mike
testgroup: mike,john
(1)启用stmp身份验证
vi /etc/mail/sendmail.mc
修改48,49行
把这两行前边的dnl去掉
(2)确保saslauthd服务正常运行
chkconfig --list saslauthd
service saslauthd start
(3)用户账号
groupadd mailgroup
useradd -g mailgroup -s /sbin/nologin mike
useradd -g mailgroup -s /sbin/nologin john
passwd mike
passwd john
(4)设置邮件别名
vi /etc/aliases
加入:
admin: mike
testgroup: mike,john
执行newaliases命令把修改写入aliases.db数据库:
newaliases
(5)生成sendmail.cf文件
m4 sendmail.mc > sendmail.cf
(6)service sendmail restart
newaliases
(5)生成sendmail.cf文件
m4 sendmail.mc > sendmail.cf
(6)service sendmail restart
14.安装pop3服务
(1)安装dovecot软件包
(1)安装dovecot软件包
(2)设置dovecot软件包
vi /etc/dovecot.conf
修改 #protocols = imap imaps
为 protocols = imap imaps pop3 pop3s
(3)启动dovecot服务
service dovecot restart
(4)设置dovecot服务的启动状态
chkconfig --list dovecot
chkconfig --level 35 dovecot on
vi /etc/dovecot.conf
修改 #protocols = imap imaps
为 protocols = imap imaps pop3 pop3s
(3)启动dovecot服务
service dovecot restart
(4)设置dovecot服务的启动状态
chkconfig --list dovecot
chkconfig --level 35 dovecot on
openwebmail
1.安装openwebmail
(1)修改系统的SELinux设置
vi /etc/sysconfig/selinux
添加:SELINUX=disabled
(1)修改系统的SELinux设置
vi /etc/sysconfig/selinux
添加:SELINUX=disabled
重启计算机使修改生效: init 6
(2)准备openwebmail所需软件
openwebmail-2.51-1.i386.rpm
perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm
perl-Compress-Zlib-1.34-1.2.el4.rf.i386.rpm
perl-suidperl-5.8.5-12.1.i386.rpm
perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm
openwebmail-2.51-1.i386.rpm
perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm
perl-Compress-Zlib-1.34-1.2.el4.rf.i386.rpm
perl-suidperl-5.8.5-12.1.i386.rpm
perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm
(3)安装所有软件
rpm -ivh perl*.rpm
rpm -ivh openwebmail*.rpm
rpm -ivh perl*.rpm
rpm -ivh openwebmail*.rpm
(4)建立dbm.conf文件
vi /var/www/cgi-bin/openwebmail/etc/dbm.conf
添加:
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
vi /var/www/cgi-bin/openwebmail/etc/dbm.conf
添加:
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
(5)初始化openwebmail系统
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
2.发布webmail
(1)启动apache服务
service httpd start
(2)访问openwebmail网页
[url]http://rhel.test.com/cgi-bin/openwebmail/openwebmail.pl[/url]
(1)启动apache服务
service httpd start
(2)访问openwebmail网页
[url]http://rhel.test.com/cgi-bin/openwebmail/openwebmail.pl[/url]
3.管理openwebmail系统
(1)配置文件
/var/www/cgi-bin/openwebmail/etc/openwebmail.conf
(2)vi /openwebmail.conf
将domainnames auto 改为 domainnames test.com
将default_language en 改为 default_language zh_CN.GB2312
将default_iconset Cool3D.English 改为 default_iconset Cool3D.Chinese.Simplified
(1)配置文件
/var/www/cgi-bin/openwebmail/etc/openwebmail.conf
(2)vi /openwebmail.conf
将domainnames auto 改为 domainnames test.com
将default_language en 改为 default_language zh_CN.GB2312
将default_iconset Cool3D.English 改为 default_iconset Cool3D.Chinese.Simplified
转载于:https://blog.51cto.com/chinagg/101236