Re: [exim-dev] [exim] spool format error: size

Top Pagina
Delete this message
Reply to this message
Auteur: Jeremy Harris
Datum:  
Aan: exim-dev
Onderwerp: Re: [exim-dev] [exim] spool format error: size
On 01/05/2019 22:54, Magnus Holmgren via Exim-dev wrote:
> The problem definitely is with primary_hostname getting overwritten with
> random data after the first message, even though the code sets store_pool =
> POOL_PERM, as directed by the documentation:
>
>     /* This needs to be retrieved through expand_string in order
>        not to violate the API. */
>     static uschar *primary_hostname=0;
>     if (!primary_hostname) {
>         store_pool = POOL_PERM;
>         primary_hostname = expand_string("$primary_hostname");
>         store_pool = POOL_MAIN;
>     }

>
> Is this a bug in SA-Exim or in Exim?
>
> I could always change this to always expand $primary_hostname; it shouldn't
> take any appreciable amount of time.


I don't find that code in the exim source... Is this a local_scan
function?

One point: It might be worth trying restoring the previous store_pool
rather than always setting it to POOL_MAIN, in case that documented
behaviour is no longer valid. Though, as you say, a simple expansion
like that is pretty cheap.

--
Cheers,
Jeremy