:: 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 the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
Sysadmin.ID
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
Sysadmin.ID
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
Sysadmin.ID
15 sec read

2 Replies to “:: Setup Attachment Size Limit on Postfix”

  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 *