diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-08-05 21:08:36 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-08-05 21:08:36 +0800 |
commit | 4eca0acb753df91976f54a38ccb3b79a9893a801 (patch) | |
tree | 095f0c6e46b0cfc42137f493756cbf3ce5bd876b /sample | |
parent | 817b96d19f820eec588ae12ee61240920d9819e2 (diff) | |
download | pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar.gz pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar.bz2 pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar.lz pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar.xz pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.tar.zst pttbbs-4eca0acb753df91976f54a38ccb3b79a9893a801.zip |
new filtermail
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2160 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'sample')
-rw-r--r-- | sample/FILTERMAIL.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sample/FILTERMAIL.pm b/sample/FILTERMAIL.pm new file mode 100644 index 00000000..2b71a917 --- /dev/null +++ b/sample/FILTERMAIL.pm @@ -0,0 +1,23 @@ +#!/usr/bin/perl +# $Id$ +# 本範例僅供參考, 配合 util/filtermail.pl 使用. +# 請依自行需要改寫後放置於 /home/bbs/bin 下. +# checkheader() 或 checkbody() 傳回為假時表示直接丟掉該封信. +package FILTERMAIL; + +sub checkheader +{ + return 0 + if( $_[0] =~ /^Subject: .*行銷光碟/im || + $_[0] =~ /^From: .*SpamCompany\.com/im ); + 1; +} + +sub checkbody +{ + return 0 + if( $_[0] =~ /<script language=\"JavaScript\"/im ); + 1; +} + +1; |