On Tue, 19 Mar 2019 17:45:50 +0000 (UTC)
Thorben Thuermer <r...@constancy.org> wrote:
> i am running postfix 3.4.1-1 (from debian sid).
> 
> i recently noticed that mails from multiple senders (most importantly
> google mail) are being rejected with:
> >  552 5.3.4 Chunk exceeds message size limit
> 
> postfix logs:
> > Mar 19 17:42:48 ngs postfix/smtpd[22671]: warning: 25E74C1: BDAT
> > request from mail-ed1-f44.google.com[209.85.208.44] exceeds message
> > size limit
> 
> this happens regardless of the actual message size,
> even a one-line plaintext message is rejected.
> 
> /etc/postfix/main.cf has:
> header_size_limit = 4096000
> message_size_limit = 0
> 
> downgrading to 3.3.2 fixed the issue.
> 
> 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"); }

- T.

Reply via email to