- 论坛徽章:
- 0
|
原帖由 abel 于 2007-1-24 15:25 发表
{auth_type}, {auth_authen} {auth_author} 不算為空,應視為未定義
也就是可以用 來判斷
if (!defined($SendmailMacros{"auth_authen"})) {
...
}
谢谢abel!
实验成功!
有这2句就可以确定唯一的发信者了。整理一下
sub filter_sender {
my ($sender,$ip,$hostname,$helo)=@_;
read_commands_file();
# 执行此句才能激活全局变量 $SendmailMacros
return (0,'服务器需要验证才能发信')
if (!defined($SendmailMacros{auth_authen}));
return (0,'验证名和邮件地址不一致')
if (lc($sender) !~ /$SendmailMacros{auth_authen}\@/);
return (1,'ok');
}
[ 本帖最后由 dragonets 于 2007-1-24 15:45 编辑 ] |
|