On Tue, Jul 20, 2010 at 12:29:09PM -0400, Victor Duchovni wrote:
> On Tue, Jul 20, 2010 at 10:14:01AM +0200, Louis-David Mitterrand wrote:
> 
> > I can't seem to get postfix to match that header:
> > 
> > Subject: =?UTF-8?Q?Vos_Factures_arrivant_a_=C3=A9ch=C3=A9ance_-_FR0905249?= 
> > 
> > with this /etc/postfix/header_check entry (PCRE):
> > 
> > /^(Subject: 
> > =\?UTF-8\?Q\?Vos_Factures_arrivant_a_=C3=A9ch=C3=A9ance_-_FR0905249\?=)/ 
> > REJECT
> > 
> > yet a: 
> > 
> >     postmap -q 'Subject: 
> > =?UTF-8?Q?Vos_Factures_arrivant_a_=C3=A9ch=C3=A9ance_-_FR0905249?=' 
> > /etc/postfix/header_check
> > 
> > does match.
> 
> The subject probably gets RFC2049 (re-)encoded by an MTA between your
> Postfix server and mailbox server. You need to record the original
> Subject, perhaps by putting the message on HOLD or otherwise capturing
> a copy before delivery to other MTAs.

The original subject is:

Nov  9 13:18:16 zenon postfix/cleanup[11310]: 3384E42508017: warning: header Sub
ject: =?UTF-8?Q?Vos_Factures_arrivant_a_=C3=A9ch=C3=A9ance_-_FR0905249?= from ..

and there is no other postfix involved. 

> > Does postfix first decode the =?UTF-8? before matching? or did I miss
> > something else?
> 
> No, Postfix does not decode the subject.

Using the _exact_ header displayed by postfix in its header 'warning':

ZENON:~# postmap -q 'Subject: 
=?UTF-8?Q?Vos_Factures_arrivant_a_=C3=A9ch=C3=A9ance_-_FR0905249?=' 
pcre:/etc/postfix/header_access_local
REJECT nous savons gérer nos échéances!

I get a match from postmap. Yet postfix does not block the message...
Why?

Reply via email to