Istvan Prosinger:
> [root@email ~]# postmap -h -q - pcre:/etc/postfix/stamp.pcre < testheader
>
> Received: from localhost (localhost [127.0.0.1])
> by email-test.server.com (Postfix) with ESMTP id 3qRyhf4pqCzKmYs
> for <[email protected]>; Sat, 19 Mar 2016 06:17:54
> -0400 (EDT) Prepend X-DIYL-3qRyhf4pqCzKmYs
> Received: from knox.prosinger.net (knox.prosinger.net [5.44.101.107])
> by email-test.server.com (Postfix) with ESMTPS id 3qRyhf0ChgzKmYq
> for <[email protected]>; Sat, 19 Mar 2016 06:17:52
> -0400 (EDT) Prepend X-DIYL-3qRyhf0ChgzKmYq
>
> I think that this means two hits.
Two Received headers match the pattern, each returns a prepend action.
> If so, what comes to my mind is that these headers are not there
> yet, in the moment when the stamper.pcre is called.
Postfix's own Received: header is prepended by smtpd(8) when receiving
mail from the network:
Received: from client-info by server-info ...
this happens BEFORE the cleanup server does the header_checks matches.
Postfix's own Received: header is prepended by pickup(8) with mail
from /usr/sbin/sendmail:
Received: by server-info ...
this happens BEFORE the cleanup server does the header_checks matches.
Wietse