- 論壇徽章:
- 0
|
我在qmail里面修改了 qmail-queue 添加spam的支持 。使得所有經(jīng)過qmial-queue 的郵件都經(jīng)過spam過濾 讓后在maildrop 中添加如果郵件有spam標記我們就把郵件投遞到.spam 目錄中。但是目前這個功能只在本地投遞的郵件其作用。從遠程發(fā)送過來的郵件不能夠?qū)崿F(xiàn)自動過濾。但查看遠程郵件服務(wù)器發(fā)送過來的郵件實際上確實經(jīng)過了spam處理 。不清楚我怎樣才能遠程投遞郵件先經(jīng)過spam再經(jīng)過maildrop
請大家?guī)兔ο旅媸?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 應(yīng)該在qmail-local 那個地方執(zhí)行。現(xiàn)在看來應(yīng)該不是在這里執(zhí)行的。各位請教下大家是如果出來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 內(nèi)如參考自己需要腳本
資料來源
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 編輯 ] |
|