Postfix 552 5.3.4 Error: message file too big

Discussion in 'Installation/Configuration' started by cjsdfw, Sep 22, 2021.

  1. cjsdfw

    cjsdfw Member

    Hi Guys,
    Running into maximum message file size error, current settings are:
    message_size_limit = 30720000
    virtual_mailbox_limit = 30720000

    Output from
    postconf | grep message_size_limit
    root@mail:/var/log# postconf | grep message_size_limit
    message_size_limit = 30720000

    Getting the error message even with 20MB attachments!

    Any pointers?
    Thanks
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is the exact error message? Maybe it is not postfix that complains...
     
  3. cjsdfw

    cjsdfw Member

    Ok, point well taken.
    • I was sending the message from Outlook and it looks like outlook has its own limit so I tried with ROundcube
    • Message size is 22MB
    • I changed Rundcube default limit of 5MB to 30MB and monitor for errors and I am still getting an error
    • There are no errors posted on /var/log/mail.err
    I ue telnet to veryfy the server max size
    Any suggestions on where to look?
    Thanks for helping

    Code:
    nano /var/lib/roundcube/.htaccess
    php_value   upload_max_filesize   30M
    php_value   post_max_size         30M
    
    tail -f /var/log/roundcube/errors
    [22-Sep-2021 13:05:54 +0000]: <btrngb94> SMTP Error: Failed to send data. Message size exceeds server limit in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1667 (POST /webmail/?_task=mail&_unlock=loading1632315954497&_lang=undefined&_framed=1&_action=send)
    
     
    Last edited: Sep 22, 2021
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I change Roundcube max attachment size this way:
    Code:
    root@posti:/etc/php/7.3/cgi# ls RCS
    php.ini,v
    root@posti:/etc/php/7.3/cgi# rcsdiff ./php.ini
    ===================================================================
    RCS file: ./RCS/php.ini,v
    retrieving revision 1.1
    diff -r1.1 ./php.ini
    689c689
    < post_max_size = 8M
    ---
    > post_max_size = 11M
    841c841
    < upload_max_filesize = 2M
    ---
    > upload_max_filesize = 10M
    
    This is on Debian 10, where default PHP is version 7.3. Change version according to OS used.
     
  5. cjsdfw

    cjsdfw Member

    Well it turns out it is Postfix causing the error:
    I set the message_size_limit to 0 in main.cf to see if it clear the issue and it did. Somehow there is about 10MB overhead in messages when Postfix determines the size of the message. Since mine is a private server I kept the message_size_limit = 0 in my configuration.

    Thanks for your help, one always learn more when pushed to search for the issue given some hints :)
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    More likely your 22MB 'message' is really a message with a 22MB file attached, which becomes closer to 30MB when encoded and formatted. You could bump the 30M limit(s) to 35 or 50 and that particular message will probably go through.
     
    cjsdfw likes this.

Share This Page