Limit email size

Discussion in 'General' started by dayjahone, Feb 20, 2008.

  1. dayjahone

    dayjahone Member

    How do I limit the size of emails that can be sent?

    Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    In postfix main.cf set:

    message_size_limit = 200000000

    The number is the max. allowed message size in bytes.
     
  3. dayjahone

    dayjahone Member

    That thread doesn't exist in the file. I'm guess that means I have no limit. If I add "message_size_limit = 5000000" to the end of the long list (after "tls_random_source = dev:/dev/urandom"), it will limit emails to 5MB?

    Thanks.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, this should work.

    Most likely there is already a limit set at the moment, as postfix uses default values in case a value is not set in main.cf. To get the current limit, run:

    postconf | grep message_size_limit
     
  5. tensor

    tensor New Member

    The more elegant way would be

    Code:
    postconf -e message_size_limit=5000000
    postconf will add the setting or alter the existing one if it exists
     

Share This Page