I'm having trouble with a simple header check running in a pre-queue amavis
setup.

The filter should DISCARD any Subject that begins with "SPAM-Verdacht
CUSTOMERNAME:"

# Pattern                               Aktion
/^Subject:\ (SPAM-Verdacht CUSTOMERNAME:\ .*)$/   DISCARD $1

Postfix may read the pcre-table:

# ls -l /etc/postfix/header.chk 
-rw-r----- 1 root postfix 69 25. Apr 09:20 /etc/postfix/header.chk

cleanup is running non-chrooted:

# cat /etc/postfix/master.cf | grep cleanup
cleanup   unix  n       -       n       -       0       cleanup

postmap filters as expected:

# postmap -q "Subject: SPAM-Verdacht CUSTOMERNAME: Test" 
pcre:/etc/postfix/header.chk
DISCARD SPAM-Verdacht CUSTOMERNAME: Test

Postfix has been configured to run header_checks:

# postconf -n header_checks
header_checks = pcre:$config_directory/header.chk

Still my testmails pass the filter. When I look at the received message
everything looks as expected:

To: recipi...@example.com
Subject: SPAM-Verdacht CUSTOMERNAME: Test
Message-ID: <20120425075309.gf23...@state-of-mind.de>

What is it I am missing?

# postconf mail_version
mail_version = 2.6.6

# rpm -qa | grep pcre
pcre-7.8-3.1.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.2 (Santiago)


p@rick


-- 
state of mind
Partnerschaft Koetter, Fleiner & Schosser

http://www.state-of-mind.de

Franziskanerstraße 15      Telefon +49 89 3090 4664
81669 München              Telefax +49 89 3090 4666

Amtsgericht München        Partnerschaftsregister PR 563
_______________________________________________
sys4-users mailing list
sys4-us...@state-of-mind.de
http://mail.state-of-mind.de/cgi-bin/mailman/listinfo/sys4-users

Reply via email to