summaryrefslogtreecommitdiff
path: root/public/fs/etc
diff options
context:
space:
mode:
authorroot@culturestrings <root@culturestrings>2020-06-04 10:57:21 +0000
committerroot@culturestrings <root@culturestrings>2020-06-04 10:57:21 +0000
commit2faeb7c9481ee401ce40217e24208c7162421add (patch)
tree4d999c58b1172527c3a8c8bd33ff72135acf056c /public/fs/etc
parent89dca39f896aec52d092a362266bd06d681c8d45 (diff)
downloadculturestrings-2faeb7c9481ee401ce40217e24208c7162421add.tar.bz2
culturestrings-2faeb7c9481ee401ce40217e24208c7162421add.tar.xz
postfix: make the configuration file site-agnostic.
Diffstat (limited to 'public/fs/etc')
-rwxr-xr-x[-rw-r--r--]public/fs/etc/postfix/main-cf.sh5
-rw-r--r--public/fs/etc/postfix/main.cf.in12
2 files changed, 10 insertions, 7 deletions
diff --git a/public/fs/etc/postfix/main-cf.sh b/public/fs/etc/postfix/main-cf.sh
index 79e8e03..840aa9a 100644..100755
--- a/public/fs/etc/postfix/main-cf.sh
+++ b/public/fs/etc/postfix/main-cf.sh
@@ -3,5 +3,8 @@
set -eu
source /root/config/private/config/server.domains
+source /root/config/private/config/hostname
-sed -e 's/@server_domains@/'"${server_domains}"'/g' "$1"
+sed -e 's/@server_domains@/'"${server_domains}"'/g' \
+ -e 's/@smtphost@/'"${smtphost}"'/g' \
+ "$1"
diff --git a/public/fs/etc/postfix/main.cf.in b/public/fs/etc/postfix/main.cf.in
index bcae80e..26b9530 100644
--- a/public/fs/etc/postfix/main.cf.in
+++ b/public/fs/etc/postfix/main.cf.in
@@ -1,6 +1,6 @@
# chain
-myhostname = mail.culturestrings.org
-mydomain = culturestrings.org
+myhostname = mail.@smtphost@
+mydomain = @smtphost@
myorigin = $mydomain
mydestination = $mydomain, localhost.$mydomain, localhost, @server_domains@
@@ -36,10 +36,10 @@ smtp_tls_loglevel = 3
smtp_tls_security_level = encrypt
smtp_tls_CApath = /etc/ssl/certs
-smtp_tls_CAfile = /srv/webroot/culturestrings.org/ssl/cert.pem
+smtp_tls_CAfile = /srv/webroot/@smtphost@/ssl/cert.pem
-smtpd_tls_key_file = /srv/webroot/culturestrings.org/ssl/privkey.pem
-smtpd_tls_cert_file = /srv/webroot/culturestrings.org/ssl/fullchain.pem
+smtpd_tls_key_file = /srv/webroot/@smtphost@/ssl/privkey.pem
+smtpd_tls_cert_file = /srv/webroot/@smtphost@/ssl/fullchain.pem
smtpd_tls_loglevel = 3
smtpd_tls_security_level = encrypt
@@ -50,7 +50,7 @@ smtpd_tls_auth_only = yes
smtpd_tls_received_header = yes
smtpd_tls_CApath = /etc/ssl/certs
-smtpd_tls_CAfile = /srv/webroot/culturestrings.org/ssl/cert.pem
+smtpd_tls_CAfile = /srv/webroot/@smtphost@/ssl/cert.pem
meta_directory = /usr/lib/postfix
setgid_group = maildrop