以前在做实验的过程中总结和写的一些教程的一些资料,一直没时间发布到博客上面,五一到了,终于有点时间发布啦!关于Linux上面还会有RHCE系列的学习笔记发表
sendmail配置文字版本(RHCE区域有图文版)
1 、编辑vi /etc/resolv.conf 添加DNS地址(nameserver 192.168.0.5)
2、编辑vi /etc/sysconfig/network,更改主机名称 HOSTNAME=mail.msl.com
3、reboot 重启系统
4、挂载系统光盘 mount /dev/cdrom
cd/media/cdrom/RedHat/RPMS
5、[root@mail6 ~]#rpm -ivh sendmail-doc-8.13.1-3.3.el4.i386.rpm sendmail-cf-8.13.1-3.3.el4.i386.rpm
6、[root@mail6 ~]# rpm -qa | grep sendmail*
sendmail-8.13.1-3.3.el4
sendmail-cf-8.13.1-3.3.el4
sendmail-doc-8.13.1-3.3.el4
7、设置“local-host-names”文件:在rhel4a上:[root@localhost ~]# vi /etc/mail/local-host-names //电子邮件域名;# local-host-names - include all aliases for your machine here.
8、vi sendmail.mc
找到DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 修改127.0.0.1为0.0.0.0
9、找到一下两行
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
去掉前面的注释 dnl
10、检测
[root@mail6 mail]# rpm -qa |grep sasl*
cyrus-sasl-2.1.19-14
cyrus-sasl-plain-2.1.19-14
cyrus-sasl-md5-2.1.19-14
cyrus-sasl-gssapi-2.1.19-14
cyrus-sasl-sql-2.1.19-14
cyrus-sasl-devel-2.1.19-14
cyrus-sasl-ntlm-2.1.19-14
11、[root@mail6 mail]# chkconfig --level 35 saslauthd on
启动saslauthd,
[root@mail6 mail]# service saslauthd start
12、建立组和邮件用户并设置密码
[root@mail6 mail]# groupadd mailuser
[root@mail6 mail]# useradd -g mailuser -s /sbin/nologin mail10
[root@mail6 mail]# useradd -g mailuser -s /sbin/nologin mail11
passwd mail10
13、访问控制设置:
[root@localhost ~]# cat /etc/mail/access# by default we allow relaying from localhost...localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
[root@mail6 mail]# makemap hash access.db <access
14、生成Sendmail.cd文件:[root@localhost ~]# cd /etc/mail #一定要进入/etc/mail命令才能执行m4命令;[root@localhost mail]# m4 sendmail.mc> sendmail.cf
15、重启Sendmail服务器:[root@localhost mail]# service sendmail restart
16、[root@mail6 mail]# netstat -ntpl |grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 5751/sendmail: acce
[root@mail6 mail]# netstat -ntpl |grep 110
[root@mail6 mail]# cd /media/cdrom/RedHat/RPMS/
[root@mail6 RPMS]#rpm -ivh dovecot-0.99.11-9.EL4.i386.rpm
17、[root@mail6 RPMS]# chkconfig --level 35 dovecot on
[root@mail6 RPMS]# service dovecot start
Starting Dovecot Imap: [ OK ]
18、vi /etc/dovecot.conf
找到 #protocols = imap imaps
改为 protocols = pop3 pop3s imap imaps
重启dovecot服务 [root@mail6 RPMS]# service dovecot restart
openwebmail的安装
1、[root@mail6 RPMS]# rpm -ivh openwebmail-2.51-1.i386.rpm perl-suidperl-5.8.5-36.RHEL4.i386.rpm perl-Compress-Zlib-1.42-1.el4.rf.i386.rpm perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm
warning: openwebmail-2.51-1.i386.rpm: V3 DSA signature: NOKEY, key ID cfb164d8
warning: perl-suidperl-5.8.5-36.RHEL4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
warning: perl-Compress-Zlib-1.42-1.el4.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:perl-Text-Iconv ########################################### [ 20%]
2:perl-Compress-Zlib ########################################### [ 40%]
3:perl-suidperl ########################################### [ 60%]
4:openwebmail ########################################### [ 80%]
You may login with non-root account from
http://mail6.msl.com/cgi-bin/openwebmail/openwebmail.pl
5:perl-CGI-SpeedyCGI ########################################### [100%]
2、添加生成dbm.conf,vi /var/www/cgi-bin/openwebmail/etc
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
3、[root@mail6 ~]# /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
OS: Linux 2.6.9-78.ELsmp i686
Perl: 5.008005
WebMail: Open WebMail 2.51 20050228
Send the site report?(Y/n) y
sending report...
Thank you.
4、安装Linux自带的Apache并启动
[root@mail6 RPMS]# rpm -ivh httpd-2.0.52-41.ent.i386.rpm httpd-suexec-2.0.52-41.ent.i386.rpm apr-util-0.9.4-22.el4.i386.rpm
[root@mail6 RPMS]# service httpd restart
5、修改配置文件中的设置项:[root@mail ~]# vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf//将下列domainnames auto//改成domainnames rhel4a.com//将下列default_language en//改成default_language zh_CN.GB2312//将下列default_iconset Cool3D.English//改成default_iconset Cool3D.Chinese.Simplified
转载于:https://blog.51cto.com/wqmsl/308030