23-李雷
安装APACH,DNS
yum install httpd yum install bind*关闭sendmail 服务
service sendmail stop chkconfig sendmail off配置DNS主配置文件
vim /var/named/chroot/etc/named.conf options{ directory "/var/named" }; zone "lilei.com"{ type master file "lilei.com.zone"};
拷贝区域模板文件
cp /usr/share/doc/bind-9.3.6/sample/var/named/localdomain zone /var/named/chroot/var/named/lilei.com.zone配置DNS区域文件
vim /var/named/chroot/var/named/lilei.com.zone
添加 @ IN SOA localhost.rootlilei.com IN NS mail.lilei.com
mail.lilei.com IN A 192.168.18.63 lilei.com IN MX 10 mail.lilei.com启动DNS服务
service named start设置开机启动
chkconfig named on 测试邮件服务器 host mail.lilei.commail.lilei.com has addressw 192.168.18.63
测试成功安装postfix邮件服务
yum install postfix配置postfix
vim /etc/postfix/main.cf
修改字段
myhostname = mail.lilei.com mydomain = lilei.com myorigin = $mydomain inet_interfaces = all mynetworks = 192.168.18.0/24, 127.0.0.0/8 relay_domains =lilei.com重启saslauthd
/etc/init.d/saslauthd restart 修改saslauthd 认证服务配置文件 vim /etc/sysconfig/saslauthd 修改支持形式shadow修改字段 MECH=shadow
重启认证服务 /etc/init.d/saslauthd restart 建立用户并设置密码useradd aaa
passwd aaa 检测认证 testsaslauthd -u aaa -p 'aaa'修改postfix 主配置文件
smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = '' smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination broken_sasl_auth_clients = yes smtpd_client_restrictions = permit_sasl_authenticated smtpd_sasl_security_options = noanonymous重启postfix 邮件服务
service postfix restart 设置开机启动 chkconfig postfix on将用户名 密码改为可识别的密文形式
perl -MMINE::Base64 -e 'print encode_base64("aaa")' 连接到lilei.com telnet mail.lilei.com 25
认证登录
auth login写入所设置的用户名和密码密文
出现 Authentication successful 登陆成功 quit 退出实现POS&IMAP
安装dovecot yum install dovecot 修改dovecot 主配置文件 vim /etc/dovecot.conf修改字段
protocols = pop3 pop3s 去掉注释行 protocol pop3{ listen = *;10100};
重启dovecot 服务 /etc/init.d/dovecot restart设置为开机启动
chkconfig dovecot on安装cyrus-imapd
yum install cyrus-imapd cyrus-imapd-devel
修改postfix 主配置文件
vim /etc/postfix/main.cf 修改第456行的字段 去掉注释 mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmpt重启cyrus-imapd
/etc/init.d/cyrus-imapd restart 设置开机启动 chkconfig cyrus-imapd on 设置系统用户密码 passwd cyrus 重启postfix service postfix restart登陆到后台
cyradm -u cyrus localhost建立用户邮箱
cm user.aaa cm user.aaa Send cm user.aaa.Trash cm user.aaa.Drafts 安装squirrelmail 实现webmailyum install squirrelmail
修改配置文件 /usr/share/squirrelmail/config/conf.pl重启httpd
service httpd restart测试