Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ _mailserver-postfix_ requires various environment variables to be set. The cont
| `PF_TLS_CAPATH` | Directory that contains trusted CA root certificates. | `/etc/ssl/certs` |
| `PF_TLS_CAFILE` | Name of single file that contains trusted CA root certificates. | `/etc/postfix/CAcert.pem` |
| `PF_TLS_ADMIN_EMAIL` | E-mail address to be notified when TLS certificate is about to expire (10 days) | `postmaster@$PF_MYDOMAIN` |
| `PF_ADD_MYNETWORKS`| A string containing additional subnets with a mask to add to the `mynetworks` file in main.cf | |

## Volumes
You need to provide data volumes in order to secure your mailboxes from data loss.
Expand Down
2 changes: 1 addition & 1 deletion etc/postfix/main.cf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
## NETWORKING
##
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 __PF_ADD_MYNETWORKS__
inet_interfaces = all
myhostname = __PF_MYHOSTNAME__
myorigin = __PF_MYORIGIN__
Expand Down
4 changes: 4 additions & 0 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ fi
if [[ -z "${PF_MILTERS}" ]]; then
PF_MILTERS=
fi
if [[ -z "${PF_ADD_MYNETWORKS}" ]]; then
PF_ADD_MYNETWORKS=
fi
####################
# Helper functions
####################
Expand Down Expand Up @@ -131,6 +134,7 @@ copy_template_file() {
replace_var $TMP_DST 'PF_DB_PASS'
replace_var $TMP_DST 'PF_ENABLE_UTF8'
replace_var $TMP_DST 'PF_MILTERS'
replace_var $TMP_DST 'PF_ADD_MYNETWORKS'
fi
if [ ! -f $TMP_DST ]; then
echo "Cannot create $TMP_DST" 1>&2
Expand Down