Re: [Exim] local_scan(): strange header structures.

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Alexander Sabourenkov
Datum:  
To: exim-users
Betreff: Re: [Exim] local_scan(): strange header structures.
Philip Hazel wrote:
> On Thu, 22 Apr 2004, Alexander Sabourenkov wrote:
>
>
>>I've been encountering strange header structures as seen from local_scan -
>>in some cases both slen and text were 0, in others, only text was 0, i.e. NULL.
>
>
>>This appeared as I was porting my code from 4.30 to 4.32.
>
>
> There was a change. The Received: header is now generated right at the
> end. However, there is a "placeholder" for it in the list of headers.
> That is probably what you are seeing. The placeholder's type is set to
> type_old, so you should be ignoring it. The text is set to NULL, but I
> see that I haven't set slen. I should probably set that 0 for tidiness.


Thanks for the explanation.

Problem was I was not aware that I should be checking header type and blindly
fed the data to the string_cat(), which crashed only when slen != 0, and this
happened about once in a 40 messages.

I am reconstructing the message so that I can feed an antivirus scanner with
data as close to what came over the wire as possible.

I have looked at the header types defined in macro.h, and it's still somewhat
unclear to me which types I should ignore.

> I should also document this in the chapter on the local_scan() API!


I think there should be at least a note that there can be empty entries in the
list.

--

./lxnt