《Postfix结合squirrelmail邮件服务器实现web界面的简单的配置.doc》由会员分享,可在线阅读,更多相关《Postfix结合squirrelmail邮件服务器实现web界面的简单的配置.doc(6页珍藏版)》请在三一办公上搜索。
1、Postfix结合squirrelmail邮件服务器实现web界面的简单的配置1.改主机名rootlocalhost named# vim /etc/sysconfig/networkrootlocalhost named# vim /etc/hosts(去删掉原来的主机名)rootlocalhost named# hostnamelocalhost.localdomainrootlocalhost named# hostname (使改的主机名立即生效)2. 因为用到了dns的解析,所以要把dns安装用到的软件包都安装上去。包括:bind . Bind-chroot 和ca. 然后做改变的东
2、西就如下rootlocalhost etc# cp -p named.caching-nameserver.conf named.conf rootlocalhost etc# vim named.conf rootlocalhost etc# vim named.rfc1912.zones (去添加.zone)rootlocalhost etc# cd ./var/named/去复制个zone,从命名.zone,并vim编辑rootlocalhost named# service named start启动 named: 确定rootlocalhost named# chkconfig na
3、med onrootlocalhost named# vim /etc/resolv.conf (改网关指向)rootlocalhost named# service named startrootlocalhost named# nslookup Server:192.168.30.120Address:192.168.30.120#53Name:Address: 192.168.30.120Postfix的配置:rootlocalhost Server# rpm -ivh postfix-2.3.3-2.1.el5_2.i386.rpmrootmail # rpm -ql postfix
4、|lessrootlocalhost named# service sendmail stop(把sendmail停掉)rootlocalhost named# chkconfig sendmail offrootlocalhost named# service postfix startrootlocalhost named# netstat -tupln |grep 25rootlocalhost Server# vim /etc/postfix/main.cfrootlocalhost named# useradd user1rootlocalhost named# passwd use
5、r1 1.验证本地域才能够发送邮件成功查看日志连接进入了延迟队列本地域发送成功编辑配置文件要改变的东西69 myhostname = 77 mydomain = 107 inet_interfaces = all(监听的地址)155 mydestination = $myhostname, localhost.$mydomain, localhost , $mydomain(定义本地域)配置完成以后查看日志,可以看到已经发送成功如何实现postfix的中继此处为telnet 登录,是外网的地址,因为默认不中继外网的,只中继本地域的改配置文件然后重启:可以看到已经中继成功255行 mynetwo
6、rks = 192.168.30.0/24, 127.0.0.0/8安全认证:需要安装sasl的软件rootmail Server# yum install -y cyrus-sasl-2.1.22-5.el5.i386.rpmrootmail Server# chkconfig -list |grep saslsaslauthd 0:关闭1:关闭2:关闭3:关闭4:关闭5:关闭6:关闭rootmail Server# service saslauthd startrootmail Server# chkconfig saslauthd onrootmail Server# man 5 pos
7、tconfrootmail # vim /etc/postfix/main.cf添加下面的内容从外网telnet上可以看到中继被拒绝rootmail # echo -n user1 |openssl base64dXNlcjFAMTYzLmNvbQ=rootmail # echo -n 123 |openssl base64MTIz输入账号密码发现已经可以中继了实现:http发邮件要安装squirrelmail-1.4.8-5.el5_3.7.noarch.rpm安装这个还有依赖的关系:http的和php的所以用yum安装比较好rootmail Server# yum install squi
8、rrelmail-1.4.8-5.el5_3.7.noarch.rpmrootmail Server# service httpd startrootmail Server# chkconfig httpd on要想http能访问到邮件目录,需要在apache的主目录下建立软连接rootmail sasl2# cd /var/www/html/rootmail html# ln -s /usr/share/squirrelmail/ mailrootmail html# cd mailrootmail mail# llrootmail mail# cd config/rootmail conf
9、ig# ./conf.pl进去做一下简单的设置改变语言 en_US: zh_CN改变字符集 iso-8859-1: GB2312改变服务器的域名 localhost: Sendmail 改变成smtprootmail config# vim /etc/httpd/conf/httpd.conf 去改变字符集747行禁掉就行了 然后重启http:192.168.30.120/mail (http登录)下面出错了,主要是没有安装dovecot接收邮件的服务器用yum将dovecot安装上就行了rootmail Server# yum install dovecot-1.0.7-7.el5.i386.rpmrootmail Server# service dovecot startrootmail Server# chkconfig dovecot on成功登录