2021-03-01 10:41:19 +00:00
---
title: 'Override the Default Configs | Postfix'
---
2018-02-07 20:01:12 +00:00
The Postfix default configuration can easily be extended by providing a `config/postfix-main.cf` in postfix format.
This can also be used to add configuration that is not in our default configuration.
For example, one common use of this file is for increasing the default maximum message size:
2021-03-01 10:41:19 +00:00
```cf
2018-02-07 20:01:12 +00:00
# increase maximum message size
2021-03-01 10:41:19 +00:00
message_size_limit = 52428800
2018-02-07 20:01:12 +00:00
```
2021-03-01 10:41:19 +00:00
That specific example is now supported and can be handled by setting `POSTFIX_MESSAGE_SIZE_LIMIT` .
2019-08-21 08:39:20 +00:00
2021-05-31 07:02:56 +00:00
!!! note
2021-03-02 16:39:06 +00:00
[Postfix documentation ](http://www.postfix.org/documentation.html ) remains the best place to find configuration options.
2018-02-07 20:01:12 +00:00
Each line in the provided file will be loaded into postfix.
2021-03-01 10:41:19 +00:00
In the same way it is possible to add a custom `config/postfix-master.cf` file that will override the standard `master.cf` . Each line in the file will be passed to `postconf -P` . The expected format is `<service_name>/<type>/<parameter>` , for example:
```cf
2019-11-10 09:10:32 +00:00
submission/inet/smtpd_reject_unlisted_recipient=no
```
2021-03-01 10:41:19 +00:00
2019-11-10 09:10:32 +00:00
Run `postconf -P` in the container without arguments to see the active master options.
2021-03-01 10:41:19 +00:00
!!! note
There should be no space between the parameter and the value.
2019-11-10 09:12:55 +00:00
2021-03-01 10:41:19 +00:00
Have a look at the code for more information.