OSEC

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

From: Aurelien Barrere (abarrereemailvision.com)
Date: Thu Nov 03 2005 - 11:49:06 CST


I configured postfix with maildrop and .mailfilter mechanism but
unfortunately the message is not rejected as I expected
I wrote a mail to Xdomain.com with in subject "out of office", I want
this mail to be rejected when matching this pattern

Here is some details : in my $HOME/X i have a .mailfilter a Maildir
structure and .forward

When i wrote a mail with "out of office" as subject it should be
rejected by my .mailfilter but it is not
Nov 3 18:22:02 bounc postfix/local[1958]: 84107AC67C:
to=<Xdomain.com>, relay=local, delay=1, status=sent (delivered to
command: /usr/local/bin/maildrop -d ${USER})
it forward the mail out of office instead of rejected

sample of my .mailfilter:

FROM='Xdomain.com'
import SENDER
if ($SENDER eq "")
{
 SENDER=$FROM
}

filter_out=0
if ((/.*[Oo]ffice/:hb))
{
   filter_out=1
}
if ( $filter_out==1 )
{
    exit
}
else
{
        to "./Maildir/."
}

a sample of my main.cf:

mailbox_command_maps = hash:/etc/postfix/mailbox_commands
#mailbox_command = /usr/local/bin/maildrop -d ${USER}
maildrop_destination_recipient_limit = 1
home_mailbox = Maildir/
#header_checks = regexp:/etc/postfix/header_checks

when line "header_checks = regexp:/etc/postfix/header_checks" is
uncommented so message is correctly rejected but i want .mailfilter do
the job not header_checks:

Nov 3 18:10:39 bounce2 postfix/cleanup[1787]: D2A57AC3FC: reject:
header Subject: out of office from
congas.percussion.jmsp.net[212.23.187.45];
from=<abarrereemailvision.com> to=<Xdomain.com> proto=ESMTP
helo=<congas.percussion.jmsp.net>: Message content rejected

sample of my master.cf:

maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

Summary:want to set up .mailfilter in order to reject some mail
according specific pattern
but I don't want to use header_checks =
regexp:/etc/postfix/header_checks that is not usefull for customize
differents clients filters

Please does someone could help me resolving this issue?

Aurelien