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

Góra strony
Delete this message
Reply to this message
Autor: Magnus Holmgren
Data:  
Dla: exim-dev, exim-users
Temat: Re: [exim-dev] [exim] spool format error: size
måndag 22 april 2019 kl. 19:57:42 CEST skrev exim-users--- via Exim-users:
> spool_wireformat did not trigger it in my case (running Ubuntu 18.04,
> without spool_wireformat enabled). I was able to reproduce it with
> following setup:
> Exim 4.90.1-1ubuntu1 with sa-exim running on one hosts (Ubuntu standard
> config with TLS enabled, sa-exim adding some headers) acting as
> smarthost, second Exim generating mail (store some 10+ messages in queue
> and trigger delivery via e.g. "exim4 -qff") and using that smarthost. As
> soon as more than one message was delivered via one connection, files
> got corrupted (not in every delivery but with a chance of about 10-20%,
> iirc). From my tests, it seems that some random data was written to the
> file (sometimes other parts of the message, sometimes other stuff).


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.

-- 
Magnus Holmgren        holmgren@???