:: Setup Attachment Size Limit on Postfix
:: 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
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.
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.