sosogh wrote:
> Hi All
>
> There are two rules in my header_checks PCRE lookup tables :
>
> /From:.*sosogh.cn/ OK
> /^Received:/ HOLD
>
> But why the following mail still be hold :
>
> Date: Fri, 7 Nov 2008 16:29:17 +0800
> From: "sosogh" <[EMAIL PROTECTED]>
> To: "sosogh" <[EMAIL PROTECTED]>
> Subject: [EMAIL PROTECTED]
> Message-ID: <[EMAIL PROTECTED]>
> X-mailer: Foxmail 6, 10, 201, 20 [cn]
> Mime-Version: 1.0
> Content-Type: multipart/alternative;
> boundary="=====003_Dragon288673622146_====="
>
> I just want mails to be hold except for those from sosogh.cn
> How can I accomplish it
>
you can't.
header_checks act on each header, one header at a time.
You may be able to use smtpd restrictions instead:
smtpd_sender_restrictions =
check_sender_access pcre:/etc/postfix/sender_access
== sender_access
/@sosogh\.cn$/ DUNNO
/./ HOLD
WARNING. sender addresses and headers are easily forged.