- 论坛徽章:
- 0
|
我在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 编辑 ] |
|