This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 想请教一个问题: 如何在sendmail或者spamassassin中针对某个具体的邮件地址屏蔽EMAIL,只允许该地址接收来自xxx.com的邮件.谢谢!
-suse(享受生活);
2006-7-17
(#3084603@0)
-
One solution is setup a alias for this perticual address, forward it to a shell like
joesmith: "| /usr/local/filter.pl"in the filter.pl, you can have something like:
#!/usr/bin/perl
my $content="";
while(<>) {
if(/^From\s+(.*\@.*\.\w+)\s+.*\d+$/) { $from = $1; }
if(/^X-Original-To:\s+(.*\@.*\.\w+)$/) { $to = $1; }
if(/^Subject:\s+(.*)/) { $subject = $1; }
$content .=$_;
}
if ( $from =~ /\@xxx.com/ )
{
save $content to the real mailbox...
}
else
{exit;}
-holdon(again);
2006-7-17
{384}
(#3085396@0)
-
thx a lot ,buddy
-suse(享受生活);
2006-7-17
(#3085798@0)
-
我是先把发到该地址的邮件投递到下一个MTA(第二个MTA instance),然后在那里过滤发件人以及为这个邮件用户设置单独的投递规则、单独的SA、病毒规则等等多了一个Hop不过以后可以做很多事(这个用户正是老板,经常有不同于其他人的特殊要求)
-guangkuan(破镜重圆);
2006-7-21
{81}
(#3093137@0)
-
你有没有偷偷加个规则,如果信里提到你的名字或者有机密字样,就偷偷转发给自己...
-holdon(again);
2006-7-21
(#3093658@0)
-
Spamassassin should provide feature: personal black white list.
-redriver(redriver);
2006-7-21
(#3093723@0)