Skip to content

Commit

Permalink
Simplify configuration
Browse files Browse the repository at this point in the history
Postfix has an option to run in foreground. Use this feature to
reduce the complexity of supervisord.conf.
  • Loading branch information
bokysan committed Aug 15, 2020
1 parent 35fa2d7 commit 3f6d133
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions configs/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ stdout_logfile_maxbytes = 0
stderr_logfile_maxbytes = 0

[program:postfix]
process_name = master
command = /usr/sbin/postfix -c /etc/postfix start-fg
autostart = true
autorestart = false
directory = /etc/postfix
command = /usr/sbin/postfix -c /etc/postfix start
startsecs = 0

[program:opendkim]
Expand Down
2 changes: 1 addition & 1 deletion scripts/common-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ postfix_setup_sender_domains() {
# Since we are behind closed doors, let's just permit all relays.
postconf -e "smtpd_relay_restrictions=permit"
elif [ -z "$ALLOW_EMPTY_SENDER_DOMAINS" ]; then
echo -e "ERROR: You need to specify ALLOWED_SENDER_DOMAINS otherwise Postfix will not run!"
error "You need to specify ALLOWED_SENDER_DOMAINS otherwise Postfix will not run!"
exit 1
fi
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ opendkim_custom_commands # Apply custom OpenDKIM settings
postfix_open_submission_port # Enable the submission port
execute_post_init_scripts # Execute any scripts found in /docker-init.db/

notice " Starting: ${emphasis}rsyslog${reset}, ${emphasis}postfix${reset}$DKIM_ENABLED"
notice "Starting: ${emphasis}rsyslog${reset}, ${emphasis}postfix${reset}$DKIM_ENABLED"
exec supervisord -c /etc/supervisord.conf

0 comments on commit 3f6d133

Please sign in to comment.