A、邮件被中继

用户报告收到大量异常的退信。

查看邮件日志提取超出一次性邮件超出10封以下的

#less /var/log/maillog |grep 'rcpt=[1-9][0-9]' |more

或者以下命令按发送的数量排序

#less /var/log/maillog |grep 'nrcpt=[1-9][0-9]' |sort -t "=" -n -k 4

Dec 14 05:48:47 mail postfix/qmgr[2797]: 9D3092150C50: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: 54FB22150C62: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: F09012150E96: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: E0E532150E45: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: 66C662150CFD: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: C28952150E7E: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: C34EE2150C2B: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: 172A62150E6D: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)
Dec 14 05:48:47 mail postfix/qmgr[2797]: 1CC472150E11: from=<monica@bestcheer.com>, size=2463, nrcpt=51 (queue active)

解决方法:

1、在FW上BLOCK这个IP地址。

2、修改monica这个用户的密码复杂一些。

3、最好重启authdaemond服务,否则可能存在缓存。

4、可能考虑使用policyed限制每个用户每天或每小时的发邮件数量。超出后禁止发信。

5、使用fail2ban

B、POP3用户被破解

1、查看LOGWATCH邮件发现存在很多如下记录,说明这个IP地址一直试图在破解POP3用户的密码,得知对方的IP地址是203.116.22.216

LOGIN FAILED, user=aaron, ip=[::ffff:203.116.22.216]: 33 Time(s)

LOGIN FAILED, user=abby, ip=[::ffff:203.116.22.216]: 33 Time(s)

LOGIN FAILED, user=abigail, ip=[::ffff:203.116.22.216]: 33 Time(s)

2、也可以查看maill.log日志使用grep “LOGIN FAILED”查看登录失败用户,写个脚本确认列出登录失败超过10次以上的用户及对端IP地址。

解决方法:

1、在FW上BLOCK这个IP地址。

2、确认此用户是否成功破解了那些用户的密码,如果存在以下行则说明该用户的密码已被破解。那么请删除或重新设置用户密码更复杂一些。

[root@mail dengwh]# less /var/log/maillog |grep 203.116.22.216 |grep "LOGIN, user"
Dec 23 15:22:40 mail pop3d: LOGIN, user=test@bestcheer.com, ip=[::ffff:203.116.22.216], port=[10421]

3、使用fail2ban

 

C、查看邮件队列图型,如果投递信件分析线成水平、或异常高于平时的值那么就应该对根据时间段对日志分析。

    查看邮件失败投递,同上!

p_w_picpath

(----2011.2.18增加----)

D、某用户报告有个客人的邮件没有收到。

1、有客人重发的邮件为证。经查询公司的邮件归档系统,确实有收到。

2、查看maillog记录根据日期时间证明有投递。如下

   less /var/log/maillog |grep elitgranit_nb@mail.ru |grep "Feb 17" 

3、查看dovecot-lda的日志,发现此时用户邮件慢了邮件被拒绝:

   less /var/log/dovecot-deliver.log |grep elitgranit_nb@mail.ru

 

Feb 17 19:07:02 lda(natasha@btr.com): Info: from=<elitgranit_nb@mail.ru>: save failed to INBOX: Quota exceeded (mailbox for user is full)

Feb 17 19:07:02 lda(natasha@btr.com): Info: from=<elitgranit_nb@mail.ru>: rejected: Quota exceeded (mailbox for user is full)

4、增加用户邮件箱容量、通知用户清理邮件、修改dovecot对超出quota的邮件为软拒绝。

E、将会保持更新。