1 最后由 明媚很忧伤 (2014-05-30 09:40:39) 编辑

主题: iRedMail遇到的问题

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):
- 使用的 Linux/BSD 发行版名称及版本号:
- 与您的问题相关的日志信息:
====
iRedMail0.8.7 ,MySQl ,CentOs6.5
postmaster收到的文件报了下列错误:
1)用自带的备份脚本备份数据库时,报错。该该脚本未做过改动。
/var/vmail/backup/backup_mysql.sh: line 2: : command not found
/var/vmail/backup/backup_mysql.sh: line 8: : command not found
/var/vmail/backup/backup_mysql.sh: line 19: : command not found
/var/vmail/backup/backup_mysql.sh: line 53: : command not found
/var/vmail/backup/backup_mysql.sh: line 59: : command not found
/var/vmail/backup/backup_mysql.sh: line 63: : command not found
/var/vmail/backup/backup_mysql.sh: line 69: : command not found
/var/vmail/backup/backup_mysql.sh: line 73: : command not found
/var/vmail/backup/backup_mysql.sh: line 76: : command not found
/var/vmail/backup/backup_mysql.sh: line 79: : command not found
/var/vmail/backup/backup_mysql.sh: line 84: : command not found
/var/vmail/backup/backup_mysql.sh: line 91: : command not found
/var/vmail/backup/backup_mysql.sh: line 93: /bin/date: No such file or directory
/var/vmail/backup/backup_mysql.sh: line 94: /bin/date: No such file or directory
/var/vmail/backup/backup_mysql.sh: line 95: /bin/date: No such file or directory
/var/vmail/backup/backup_mysql.sh: line 96: /bin/date: No such file or directory
/var/vmail/backup/backup_mysql.sh: line 98: : command not found
/var/vmail/backup/backup_mysql.sh: line 101: : command not found
/var/vmail/backup/backup_mysql.sh: line 104: : command not found
/var/vmail/backup/backup_mysql.sh: line 107: : command not found
/var/vmail/backup/backup_mysql.sh: line 133: syntax error near unexpected token `'
/var/vmail/backup/backup_mysql.sh: line 133: `backup_db()
2)logwatch for mail有大量的Unmatched Entries,截取了其中一部分
--------------------- Amavisd-new Begin ------------------------

        1   *Warning             
  **Unmatched Entries**
       1   (11542-15) Passed CLEAN {RelayedOutbound}, LOCAL [114.135.14.211]:5580 [114.135.14.211] <*@*.com.cn> -> <*@*.com.cn>, Message-ID: <201405282047104759871@*.com.cn>, mail_id: 4DpPfTRagqHJ, Hits: -9.989, size: 1023757, queued_as: 5B6AA300A90, 1662 ms
1   (08231-09) Passed SPAM {RelayedOutbound}, LOCAL [42.49.220.22]:4581 [42.49.220.22] <panstone@vogins.com> -> <*@*.com.cn>, mail_id: 00fXqfHatSvo, Hits: 18.926, size: 7637, queued_as: 32701300A9C, 5722 ms
        1   (08150-08) Passed CLEAN {RelayedOutbound}, LOCAL [183.60.191.193]:12413 [183.60.191.193] <reo@ubuye.com> -> <*@*.com.cn>, mail_id: VXA-yeJrsvpr, Hits: 2.758, size: 6837, queued_as: CB482300A9C, 5012 ms
        1   (11368-12) Passed SPAM {RelayedOutbound}, LOCAL [42.49.211.167]:1473 [42.49.211.167] <mercaofa@rarelock.com> -> <*@*.com.cn>, mail_id: CLmoFyh5GbTi, Hits: 19.548, size: 13820, queued_as: 16996300A90, 3936 ms
        1   (05169-07) Passed SPAM {RelayedOutbound}, LOCAL [114.132.245.60]:12570 [114.132.245.60] <willanudrtum@200433.com> -> <*@*.com.cn>, Message-ID: <OA4ROFKZ2CF2.20143728023713@200433.com>, mail_id: DOHajFhGJEXC, Hits: 10.738, size: 10214, queued_as: 9C83E300A99, 5159 ms
        1   (14773-03) Passed SPAM {RelayedOutbound}, LOCAL [118.186.196.1]:11664 [118.186.196.1] <kmwplhcdwywga@200433.com> -> <*@*.com.cn>, Message-ID: <LU8W1SUDW7.20140428230433@200433.com>, mail_id: z5-let6RZL04, Hits: 13.088, size: 10709, queued_as: E117F300AA0, 2948 ms
        1   (11542-18) Passed CLEAN {RelayedOutbound}, LOCAL [114.135.14.211]:6594 [114.135.14.211] <*@willzone.com.cn> -> <fczhan@*.com.cn>, Message-ID: <201405282105032823471@*.com.cn>, mail_id: olnTzlvg5wT8, Hits: -9.999, size: 175463, queued_as: 9003B300A90, 989 ms
        1   (11542-06) Passed SPAM {RelayedOutbound}, LOCAL [49.70.249.54]:3290 [49.70.249.54] <zx@skwjogk.com> -> <*@*.com.cn>, Message-ID: <20140528164925612630@skwjogk.com>, mail_id: 9weMDyRZjPhQ, Hits: 8.001, size: 23706, queued_as: 51D43300AA0, 1965 ms
        1   (05271-19) Passed SPAM {RelayedOutbound}, LOCAL [118.186.196.205]:32819 [118.186.196.205] <rjtjssfytbdab@200433.com> -> <*@*.com.cn>, Message-ID: <YAXSJY8TH.20144428074402@200433.com>, mail_id: p1m40bxFq9f1, Hits: 11.962, size: 10277, queued_as: 29771300A74, 1607 ms
        1   (05169-04) Passed CLEAN {RelayedOutbound}, LOCAL [115.28.211.118]:60297 [115.28.211.118] <lifevc@qqmail.com> -> <*@*.com.cn>, Message-ID: <5384DF17.DFB2A8.12602@AY140307165816583416Z>, mail_id: CiIHzYu96r9s, Hits: 4.998, size: 12866, queued_as: 60DA2300A8B, 5134 ms

请问张工,这两个问题该怎么处理。谢谢了。

回复: iRedMail遇到的问题

明媚很忧伤 写道:

1)用自带的备份脚本备份数据库时,报错。该该脚本未做过改动。
/var/vmail/backup/backup_mysql.sh: line 2: : command not found

贴一下 root 用户的 cron job 吧,可能你使用了错误的命令来执行这个脚本。

3 最后由 明媚很忧伤 (2014-05-30 16:59:10) 编辑

回复: iRedMail遇到的问题

[root@mail ~]# crontab -l
# iRedMail: Cleanup Cluebringer database
1   3   *   *   *   /usr/sbin/cbpadmin --config=/etc/policyd/cluebringer.conf --cleanup >/dev/null
# iRedMail: update Awstats statistics
1   */1   *   *   *   perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=web -update >/dev/null
1   */1   *   *   *   perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -update >/dev/null
# iRedMail: Backup MySQL databases on 03:30 AM
30   3   *   *   *   /bin/bash /var/vmail/backup/backup_mysql.sh

回复: iRedMail遇到的问题

手工执行一次是否正常运行?

# /bin/bash /var/vmail/backup/backup_mysql.sh

回复: iRedMail遇到的问题

问题已经找到。
原文件后面莫名的出现了^m字符。现在已经解决。
感谢张工回复。