Create /etc/postfix/sql

Signed-off-by: René Jochum <rene@jochum.dev>
master
René Jochum 4 years ago
parent 36f59ce636
commit 7c4e9344a6

@ -15,13 +15,23 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO postfix;
- MYDOMAIN
- SUBNET
- RELAYNETS
- RELAYHOST - outgoing relay
- SQL_TYPE - either `pgsql` or `mysql`
- SQL_USER - readonly Database user
- SQL_PASSWORD
- SQL_HOST
- SQL_DATABASE
- MESSAGE_SIZE_LIMIT - defaults to 52428800
- REJECT_UNLISTED_RECIPIENT - "yes" or "no"
## Volumes
### Overrides
- Can contain overrides for config templates/files
### cert
- Must contain ca.crt, tls.crt, tls.key
## Links

@ -25,6 +25,8 @@ if "MESSAGE_SIZE_LIMIT" not in os.environ:
if "DOVECOT_HOST" not in os.environ:
os.environ['DOVECOT_HOST'] = 'dovecot'
os.mkdir('/etc/postfix/sql')
for postfix_file in glob.glob("/conf/*.cf"):
destination = os.path.join("/etc/postfix", os.path.basename(postfix_file))
shutil.copyfile(postfix_file, destination)
@ -46,7 +48,7 @@ if os.path.exists("/overrides/postfix.master"):
if is_valid_postconf_line(line):
os.system('postconf -Me "{}"'.format(line))
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
os.system("/usr/lib/postfix/sbin/post-install meta_directory=/etc/postfix create-missing")
# Before starting postfix, we need to check permissions on /queue
# in the event that postfix,postdrop id have changed
os.system("postfix set-permissions")

Loading…
Cancel
Save