On 04/03/2019 15:23, Vsevolod Stakhov wrote:
> Bill,
> 
> On 04/03/2019 15:11, Bill Cole wrote:
>> On 4 Mar 2019, at 6:58, Vsevolod Stakhov wrote:
>>
>>> Hello,
>>>
>>> I'm trying to debug one issue with the milter interface in Postfix. I
>>> want to remove multiple headers with the same name, for example:
>>>
>>> X-Spam-Flag: No
>>> X-Spam-Flag: No
>>> X-Spam-Flag: Not really
>>> X-Spam-Flag: No
>>>
>>
>> I have not tested this, but your description is consistent with the
>> Milter interface acting immediately on your deletion of the indexed
>> header instance and collapsing the array, modifying which index points
>> to which data. So, after you delete the 1st "X-Spam-Flag" header, you
>> now have 3 instances remaining, with the new 1st instance being the
>> former 2nd instance. This way, if you delete the 2nd instance, you are
>> deleting what WAS the 3rd.
> 
> It is not consistent with the Sendmail behaviour:
> 
> https://groups.google.com/forum/#!msg/comp.mail.sendmail/Xgl1DE3lTUg/_uaAEmTM8EYJ
> 
> For me, it doesn't make any difference to send `1` 4 times instead of
> sending `1, 2, 3, 4` sequence. But I'm worried not to break other MTAs
> that use milter protocol.
> 


Ok, I've just realized that the obviously correct solution of this
problem is to delete headers in the reversed order. We can close this
question I suppose.

Reply via email to