Increase Attachment Size In Postfix

By bhagwatchouhan
Increase Attachment Size In Postfix

Postfix is one of the popular Mail Transfer Agent used to communicate or relay emails between the internet and the email server to send and receive emails to other servers. The default attachment size of Postfix is 10240000 i.e. 10 MB. We can update the attachment size either by updating the main configuration file or by using the command postconf. This tutorial provides the steps to configure Postfix to increase the attachment size on Ubuntu 20.04 LTS. The steps should be the same on other versions of Ubuntu and Linux systems.

 

Update Main Configuration File

 

We can check the current value of attachment size as shown below.

 

# Postfix Attachment Size
postconf | grep message_size_limit

# Output
message_size_limit = 10240000

 

We can update the main configuration file as shown below.

 

# Configure Postfix Main
sudo nano /etc/postfix/main.cf

# Update
------
------
message_size_limit = 20480000
------
------

# Save and exit the editor - Ctrl + o -> Enter + Ctrl + x

# Reload Postfix
sudo service postfix reload
# OR
sudo systemctl reload postfix

# Postfix Attachment Size
postconf | grep message_size_limit

# Output
message_size_limit = 20480000

This is how we can increase the attachment size limit by updating the main configuration of Postfix.

 

Use The Command postconf

 

We can also update the attachment size of Postfix using the postconf command as shown below.

 

# Update Attachment Size
sudo postconf -e message_size_limit=20480000

# Postfix Attachment Size
postconf | grep message_size_limit

# Output
message_size_limit = 20480000

 

Summary

 

This tutorial provided the steps to configure Postfix to increase the message size limit.

Share this blog:

Profile picture for user bhagwatchouhan
bhagwatchouhan