On Tue, 19 Mar 2019 19:21:43 +0100 "wilfried.es...@essignetz.de" <wilfried.es...@essignetz.de> wrote: > Hi, > > how do you come to set message_size_limit = 0? > > I'd suggest to comment it out for the default of 10240000. Or set > something reasonable for your environment.
i changed this when i needed to receive a message that was larger than ten megabytes. (yes, sadly people use email to transfer files.) i did check now and i do find that it is not mentioned in the official documentation, but outside of the newly added chunking, the code implements a logic of "0 means no limit". (i probably found that suggestion somewhere on the web.) (yes, that is probably a bad choice for production systems.) feel free to choose what the correct behavior is, but maybe it should be consistent between chunked and non-chunked. > Or switch chunking off: http://www.postfix.org/BDAT_README.html > > > >> downgrading to 3.3.2 fixed the issue. > > As i know, chunking came with PF 3.4. > > Willi - T. > >> i found the responsible code in postfix-3.4.1/src/smtpd/smtpd.c > >> commenting out that check also fixes the issue. > >> > >> /* Block too large chunks. */ > >> if (state->act_size > var_message_limit - chunk_size) { > > > > after some more reading of code, > > it turns out that this usage of `var_message_limit` is missing the > > check of `var_message_limit > 0` that in other places enables `0` > > to mean "no limit", and thus it enforces a limit of 0 with my > > config :( > > > >> state->error_mask |= MAIL_ERROR_POLICY; > >> msg_warn("%s: BDAT request from %s exceeds message size > >> limit", state->queue_id ? state->queue_id : "NOQUEUE", > >> state->namaddr); > >> return skip_bdat(state, chunk_size, final_chunk, > >> "552 5.3.4 Chunk exceeds message size limit"); > >> }