Linux学习之邮件服务器(2)

[root@localhost ~]# tar zxf Unix-Syslog-1.1.tar.gz
 
[root@localhost Unix-Syslog-1.1]# perl Makefile.PL
 
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 1.
 
BEGIN failed--compilation aborted at Makefile.PL line 1.
 
[root@localhost Unix-Syslog-1.1]# yum install -y perl-ExtUtils-MakeMaker
 
[root@localhost Unix-Syslog-1.1]# yum install make gcc -y
 
[root@localhost Unix-Syslog-1.1]# perl Makefile.PL
 
[root@localhost Unix-Syslog-1.1]# make install
 
[root@localhost ~]# tail -f /var/log/maillog 查看日志

2.加入验证码防暴力注册
 
修改配置文件extman/webman.cf
 
SYS_CAPTCHA_ON = 1

[root@localhost ~]# yum localinstall perl-GD-2.45-1.el6.rfx.x86_64.rpm -y

3.绘制图表查看登录频率等信息
 
[root@localhost ~]# yum install rrdtool-perl-1.3.8-6.el6.x86_64.rpm -y
 
[root@localhost ~]# cp -r /var/www/extsuite/extman/addon/mailgraph_ext/ /usr/local/
 
lftp 192.168.0.1:~> get pub/postfix/File-Tail-0.99.3.tar.gz
 
[root@localhost ~]# tar zxf File-Tail-0.99.3.tar.gz
 
[root@localhost ~]# cd File-Tail-0.99.3
 
[root@localhost File-Tail-0.99.3]# yum install perl-Time-HiRes -y
 
[root@localhost File-Tail-0.99.3]# perl Makefile.PL
 
[root@localhost File-Tail-0.99.3]# make install
 
[root@localhost File-Tail-0.99.3]# /usr/local/mailgraph_ext/mailgraph-init start
 
刷新管理员页面,点击Graph Log


使用dovecot接收邮件
 
[root@mail ~]# yum install dovecot-mysql -y
 
[root@mail conf.d]# vim 10-mail.conf
 
mail_location = maildir:/home/vmail/%d/%n/Maildir
 
first_valid_uid = 800
 

[root@mail conf.d]# vim 10-auth.conf
 
#!include auth-system.conf.ext
 
!include auth-sql.conf.ext
 

[root@mail conf.d]# cp /usr/share/doc/dovecot-2.0.9/example-config/dovecot-sql.conf.ext /etc/dovecot/
 

[root@mail dovecot]# vim dovecot-sql.conf.ext
 
driver = mysql
 
connect = host=localhost dbname=extmail user=extmail password=extmail
 
default_pass_scheme = PLAIN
 
password_query = \
 
  SELECT username, domain, password \
 
  FROM mailbox WHERE username = '%u' AND domain = '%d'
 
user_query = SELECT maildir, 800 AS uid, 800 AS gid FROM mailbox WHERE username = '%u'
 

[root@mail dovecot]# /etc/init.d/dovecot restart
 
[root@mail ~]# yum install telnet* -y
 
[root@mail dovecot]# telnet localhost 110
 
Trying ::1...
 
Connected to localhost.
 
Escape character is '^]'.
 
+OK Dovecot ready.
 
user weifang@extmail.org
 
+OK
 
pass weifang
 
+OK Logged in.
 
list
 
+OK 0 messages:
 
.
 

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

转载注明出处:https://www.heiqu.com/60f41d1d6ecde53e974d58bd02f570d4.html