|
|

楼主 |
发表于 2004-10-28 09:20:59
|
显示全部楼层
下面有段话可以实现但我看不懂
badmimetypes 文件
如果文件里面带有诸如 .pif .src 的文件,立刻被认定为非法邮件而阻止传送。 比如 病毒文件附件中有 .src 文件(其邮件的.src文件部分的前 9 个 base64 字符为 TVqQAAMAA ) 就阻止 。 这里我没有阻止掉.zip文件。
TVqQAAMAA
TVqQAAMAA
TVpQAAIAA
TVpAALQAc
TVpyAXkAX
TVrmAU4AA
TVrhARwAk
TVoFAQUAA
TVoAAAQAA
TVoIARMAA
TVouARsAA
TVrQAT8AA
VFZxUUFBT
VkZaeFVVR
# *.zip
# UEsDBAkAA
然后运行 qmail-newbmt 命令即可更新它的cdb。
# qmail-newbmt
这里要注意的是,不是说你拥有了这些文件,这些功能就可以起作用,而是要在linux的环境变量中设置相应的变量(就像设置开关一样,if <变量存在> then <运行>),设置的方法在 shell 中用 export 命令,或者添加在 qmail 的 qmail-smtpd/run 命令中即可。
注意看 README的 3.1, 检查使用每个过滤条件所必须具备的条件,
1. the environment variable $BADMIMETYPE="" is set
2. and the control file badmimetypes.cdb is populated and readable by qmail-smtpd .
3. the formerly possible definition of a particular badmimetype via $BADMIMETYPE="abcdefghi" has been removed.
那么要使用 badmimetypes 就必须设置变量 $BADMIMETYPE="" ,设置变量的方法和 $MFDNSCHECK 一样。在 qmail-smtpd/run 添加以下一行,并重启qmail。
export BADMIMETYPE =""
README的 3.1
3.1 Employing the BADMIMETYPE-Filter
The badmimetype filter becomes active if
# the environment variable $BADMIMETYPE="" is set
# and the control file badmimetypes.cdb is populated and readable by qmail-smtpd.
# the formerly possible definition of a particular badmimetype via $BADMIMETYPE="abcdefghi" has been removed.
3.2 Control files badmimetypes and badmimetypes.cdb
badmimetypes.cdb is populated by the additional program qmail-newbmt which takes the input of badmimetypes. New MIME signatures can be added/removed on-the-fly.
The currently included MIME signatures are:
TVqQAAMAA
TVpQAAIAA
TVpAALQAc
TVpyAXkAX
TVrmAU4AA
TVrhARwAk
TVoFAQUAA
TVoAAAQAA
TVoIARMAA
TVouARsAA
TVrQAT8AA
# *.zip
# UEsDBAkAA
# *.z (gnu-zip)
# H4sIADWWb
# double Base 64 Windows Executable
VFZxUUFBT
# triple Base 64 Windows Executable
VkZaeFVVR
3.3 Adding new BADMIMETYPES
Adding new BADMIMETYPES is simple:
1. Send an E-Mail to a Unix account with corresponding attachment (i.e. *.zip).
2. Use an editor to view the E-Mail and spot the corresponding Base64 encoded content-type.
3. Take the first nine significant characters (for type "zip" its "UEsDBAkAA") and include them into control/badmimetypes.
4. Run qmail-newbmt.
Comments (starting with "#") are allowed in badmimetypes; the length of the signature has to be nine characters; trailing characters are not allowed.
大家可以到下列网址看看:
http://www.fehcom.de/qmail/spamcontrol/README_spamcontrol.html |
|