Wietse Venema via Postfix-users escribió el 10/12/2023 a las 22:54:
Carlos Velasco via Postfix-users:
Wietse Venema via Postfix-users escribi? el 10/12/2023 a las 21:53:
Carlos Velasco via Postfix-users:
Wietse Venema via Postfix-users escribi? el 10/12/2023 a las 19:44:
Carlos Velasco via Postfix-users:
*** And there is the milter, is custom made ***
You need to reduce complexity.
- If you remove the Milter, is the header still duplicated?
No.
Duplication only happens when, in milter, I delete that header and readd it
again.
Obviously, you are not deleting that header!
How do you know that the header is readlly deleted? Can you show a
message that the header is removed when you aren't adding that
header with the Milter?
Obviously, I am deleting that header, like all others!
header received in the header callback:
milter[548374]: header: Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2620:137:e000::1:20; helo=out1.vger.email;
envelope-from=linux-kernel-ow...@vger.kernel.org; receiver=<UNKNOWN>
Header removed in the eom callback, NO error reported:
postfix/cleanup[563179]: reply: SMFIR_CHGHEADER data 18 bytes
postfix/cleanup[563179]: cleanup_del_header: 1 "Received-SPF"
postfix/cleanup[563179]: cleanup_find_header_start: index 1 name "Received-SPF"
postfix/cleanup[563179]: cleanup_find_header_start: index 1 name Received-SPF
type 78 offset -1
I asked for a copy of the (headers of the) resulting message that
Postfix delivers.
- Does it have a Received-SPF header?
- Does it have two?
1. Deleting the header in the milter or doing nothing in the milter has the
same result: final email has only 1 Received-SPF header.
2. Deleting the header in the milter and re-adding it result: final email gets
the 2 Received-SPF headers, but in different positions.
In 1:
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2620:137:e000::1:20;
helo=out1.vger.email; envelope-from=linux-kernel-ow...@vger.kernel.org;
receiver=<UNKNOWN>
Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) <--
*this is the own Received generated by postfix*
by server.domain.com (ESMTP Server) with ESMTP id A754FC0087
for <xx...@domain.com>; Sun, 10 Dec 2023 23:03:11 +0100 (CET)
*** Rest of headers seen in milter ***
In 2:
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2620:137:e000::1:20;
helo=out1.vger.email; envelope-from=linux-kernel-ow...@vger.kernel.org;
receiver=<UNKNOWN>
Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) <--
*this is the own Received generated by postfix*
by server.domain.com (ESMTP Server) with ESMTP id A754FC0087
for <xx...@domain.com>; Sun, 10 Dec 2023 23:03:11 +0100 (CET)
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2620:137:e000::1:20;
helo=out1.vger.email; envelope-from=linux-kernel-ow...@vger.kernel.org;
receiver=<UNKNOWN> <-- *repeated*
*** Rest of headers seen in milter ***
So, my understanding is that the policyd generated header is somehow out of the
scope in the milter, although it shows up as a normal header.
I have found this in some milter documentation, so I assume there is not error
control in the protocol:
"Note that the status returned indicates only whether or not the filter's message
was successfully sent to the MTA, not whether or not the MTA performed the requested
operation"
Test. Deleting a non-existant header produces the same logs and no errors:
postfix/cleanup[569527]: reply: SMFIR_CHGHEADER data 15 bytes
postfix/cleanup[569527]: cleanup_del_header: 1 "qwrrewwre"
postfix/cleanup[569527]: cleanup_find_header_start: index 1 name "qwrrewwre"
postfix/cleanup[569527]: cleanup_find_header_start: index 1 name qwrrewwre type
78 offset -1
BTW, The Postfix SMFIR_CHGHEADER implementation will delete a header
when the caller specifies an empty header value. That must be for some
compatibility reason.
I'm doing this correct. I can delete other headers without problem, *including the own
Received header*, using chgheader("Received", 1, NULL). And this one really
should be really out of scope.
Regards,
Carlos Velasco
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org