Qmail 中的外发邮件限制
Posted
技术标签:
【中文标题】Qmail 中的外发邮件限制【英文标题】:Outgoing mails limit in Qmail 【发布时间】:2016-01-20 02:29:07 【问题描述】:我在谷歌上搜索发现这个链接很有帮助https://serverfault.com/questions/538233/qmail-limit-number-of-emails-sent-by-user-or-domain-per-hour
我的操作系统是带有 Plesk 11.x + Qmail 的 Centos
I tried my best to follow given directives in the link e.g.
1) I installed spamdkye successfully
2) Created mkdir -p /home/vpopmail/bin/qmail-antispam
3) mkdir -p /etc/qmailadmin/qmail-spam/blacklist
4) crontab -e
*/5 * * * * /home/vpopmail/bin/qmail-antispam >> /var/log/maillog 2>&1
5) I saved script as qmail-antispam as well as moved as blacklist but on both positions it displays:
Code:
# tail -f /var/log/maillog | grep "qmail-antispam"
/bin/sh: /home/vpopmail/bin/qmail-antispam: is a directory
/bin/sh: /home/vpopmail/bin/qmail-antispam: is a directory
Tue Oct 20 12:55:01 CDT 2015 qmail-antispam : Revisando logs
Tue Oct 20 12:55:01 CDT 2015 qmail-antispam : Fin de revision
Tue Oct 20 13:00:01 CDT 2015 qmail-antispam : Revisando logs
Tue Oct 20 13:00:01 CDT 2015 qmail-antispam : Fin de revision
问题: 请告知在哪里: 1) 我将此脚本保存在 /etc/qmailadmin/qmail-spam/blacklist 或 /home/vpopmail/bin/qmail-antispam 中的哪个名称?
2) MAX_CORREOS=3000 //是设置最大限制吗?? ID_SERVER="ID_SERVER" //我可以把这个改成我的服务器主机名吗?? CONTACTO=admin@gmail.com //这里我设置了管理员邮箱来发送报告。是这样吗??
请指教
感谢期待
【问题讨论】:
【参考方案1】:vi /home/vpopmail/bin/qmail-antispam
复制并粘贴Link 中提供的脚本 编辑脚本并更改以下内容:
MAX_CORREOS=100
ID_SERVER="my server hostname"
CONTACTO=admin@gmail.com
# chown root /home/vpopmail/bin/qmail-antispam
# chmod 755 /home/vpopmail/bin/qmail-antispam
并检查其工作正常:
# tail -f /var/log/maillog | grep "qmail-antispam"
Wed Oct 21 19:20:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:25:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:30:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:35:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:40:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:45:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:50:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 19:55:01 CDT 2015 qmail-antispam : Revisando logs
Wed Oct 21 20:00:01 CDT 2015 qmail-antispam : Revisando logs
【讨论】:
以上是关于Qmail 中的外发邮件限制的主要内容,如果未能解决你的问题,请参考以下文章