OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Body_checks and header_checks

From: Adam Clark (adam.clarkngv.vic.gov.au)
Date: Mon Mar 29 2004 - 17:25:04 CST


I'm trying utilize the body_checks function and It seems to have no
effect whatsoever.
 
Is there any prerequisite for these functions to work?

This is very frustrating, as I cannot get it to work or break.

Is there any logging options I can turn on?

below is my main.cf, body_checks and test email.
 
main.cf:
queue_directory = /var/spool/postfix
program_directory = /usr/lib/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
myhostname = our.domain
mydestination = $myhostname, localhost.$mydomain, /etc/postfix/vdomains
alias_maps = hash:/etc/aliases
mailbox_command = /usr/bin/procmail
mynetworks = 192.168.0.0/16, 127.0.0.1, 172.16.0.0/16
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
debug_peer_level = 2
debugger_command =
         PATH=/usr/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
body_checks = regexp:/etc/postfix/body_checks
#body_checks = pcre:/etc/postfix/body_checks # both pcre and regexp do
nothing

/etc/postfix/body_checks:
/adamtest/ REJECT
 
Test message:
Received: by gw (mbox tmctester)
 (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue Mar 30 09:18:32
2004)
X-From_: testour.domain Tue Mar 30 09:18:31 2004
Return-Path: <testour.domain>
Delivered-To: testie.mctesterour.domain
Received: from NGVPC00004061 (NGVPC00004061.ngvi.our.domain
[172.16.7.161])
        by our.domain (Postfix) with SMTP id 3B24D30127
        for <testie.mctesterour.domain>; Tue, 30 Mar 2004 09:18:31
+1000 (EST)
Message-ID: <001201c415e4$265380f0$a10710acNGVPC00004061>
From: "Adam Clark" <testour.domain>
To: "Testie McTester" <testie.mctesterour.domain>
Subject: test
Date: Tue, 30 Mar 2004 09:18:31 +1000
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

adamtest

 
Adam Clark
 
Network Administrator
National Gallery of Victoria