免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3062 | 回复: 0
打印 上一主题 下一主题

[Mail] 关于qmail spamassassin 与maildrop先后执行的疑问[已解决] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-06 14:41 |只看该作者 |倒序浏览
我在qmail里面修改了 qmail-queue 添加spam的支持 。使得所有经过qmial-queue 的邮件都经过spam过滤 让后在maildrop 中添加如果邮件有spam标记我们就把邮件投递到.spam 目录中。但是目前这个功能只在本地投递的邮件其作用。从远程发送过来的邮件不能够实现自动过滤。但查看远程邮件服务器发送过来的邮件实际上确实经过了spam处理 。不清楚我怎样才能远程投递邮件先经过spam再经过maildrop
请大家帮忙下面是/etc/maildropc
Global maildrop filter file
#DEFAULT="$HOME/Maildir/"
#
# Define variables
#
SHELL="/bin/bash"
DEFAULT = "$HOME/Maildir"
MAILDIR = "$HOME/Maildir"
#
#  Logfile destination
#  After your satisifed that this is working properly, comment out all
#  the lines that start with "log"
#
logfile "$HOME/.maildrop.log"
#
# Markers for the log file
#
log "Markers:   ---------------------------------------------"
log " (**) from config file, (II) informational, (WW) warning"
log "--------------------------------------------------------"
log ""
#`cd $DEFAULT; /usr/bin/maildirmake .spam`
#xfilter "/usr/bin/spamassassin"
if (/X-Spam-Status:\ Yes/)
{
#        to "$HOME/Maildir/.spam/"
to "$DEFAULT/.spam/"
}

qmail-queue
#!/bin/bash

/usr/bin/spamc | /var/qmail/bin/mailparser | /var/qmail/bin/qmail-queue.org




按照道理maildrop 应该在qmail-local 那个地方执行。现在看来应该不是在这里执行的。各位请教下大家是如果出来spam邮件的!能否和gmail提供一样的功能?

我使用的是qmail-ldap 用下面的办法添加的maildrop
To enable maildrop, we must setup the appropiate control files so that an external program can be used and then set the correct attributes for every user with this feature. To activate third party programs globally in qmail, do the following:

echo ldapwithprog>/var/qmail/control/ldapdefaultdotmode

And set the next content in the deliveryProgramPath attribute for every user which will use maildrop:

/usr/local/bin/maildrop

To avoid duplicate mails, set deliveryMode attribute to:

nolocal



Qmail在投递的时候走的是Qmail-local 在MTA通讯时候不通过qmail-queue只有本地用户才使用这条路径
上边的LDAP删除。在用户目录下添加.qmail 和.mailfilter
.qmail 如下
#spamassassin

|/usr/bin/maildrop ./.mailfilter
.mailfilter 内如参考自己需要脚本

资料来源
http://www.qmail-ldap.org/wiki/
http://gentoo-wiki.com/Maildrop_configuration
http://www.buberel.org/linux/courier-maildrop-spamassassin.php
http://bbs.igenus.org/phpBB2/viewtopic.php?p=5485&

[ 本帖最后由 真少少 于 2008-3-10 10:41 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP