:: Setup Attachment Size Limit on Postfix

21 sec read

:: What is Postfix
Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. It is intended as a fast, easier-to-administer, and secure alternative to the widely-used Sendmail MTA. – WikiPedia
 
:: How to setup attachment size limit
+ checking limit size for attachment

postconf | grep message_size_limit
# default is 10MB
message_size_limit = 10240000

+ edit main.conf on this line

postconf -e "message_size_limit = 5240000"

+ checking new configuration

postconf | grep message_size_limit
# change to 5MB
message_size_limit = 5240000

+ restarting postif

/etc/init.d/postfix restart

 
:: Link
+ Google
+ Janjonas

How to fix problem with…

Facing a Git error with the 'vi' editor? Discover how to easily fix it by checking your Vim path and configuring Git to use...
Sysadmin.ID
10 sec read

Apache :: MP4 Streaming

Learn how to enable MP4 streaming in Apache with the installation of the mod_h264 streaming module, making your video content accessible and efficient. Follow...
Sysadmin.ID
18 sec read

Apache :: Flash / FLV…

Learn how to effortlessly configure Apache for FLV streaming by installing the mod_flvx module and updating your httpd.conf file. Discover the simple steps to...
Sysadmin.ID
15 sec read

2 Replies to “:: Setup Attachment Size Limit…”

  1. Hi
    I want to configure user wise restrictions like attachment size, message size, file extension blocking etc.

    Please let me know how to do it.

    1. Hello Prasad,

      vi /etc/postfix/main.cf
      #message/inbox size:
      mailbox_size_limit = 5240000
      # extension blocking
      mime_header_checks = regexp:/etc/postfix/mime_blocking

      vi /etc/postfix/mime_blocking
      # add like this
      /name=[^>]*.(file|extension|blocking)/ REJECT
      example:
      /name=[^>]*.(bat|com|exe)/ REJECT

      restart postfix

      i hope it helps.

      thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *