diff options
author | Chloe Brown <chloe.brown.00@outlook.com> | 2022-08-01 14:16:26 +0100 |
---|---|---|
committer | Chloe Brown <chloe.brown.00@outlook.com> | 2022-08-01 14:16:26 +0100 |
commit | cb0a492805d0a0be6f0b7ee2a445922a0e1322ef (patch) | |
tree | f3c95bddc7d69d82452616d81e5bb4966d579f8d | |
parent | f77424d5f4c4a384d6422d49bd78144e6775fd06 (diff) |
exim: make /etc/exim.conf a default configuration.
-rw-r--r-- | yellowsquid/packages/mail.scm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/yellowsquid/packages/mail.scm b/yellowsquid/packages/mail.scm index cd980ce..a5c468f 100644 --- a/yellowsquid/packages/mail.scm +++ b/yellowsquid/packages/mail.scm @@ -13,7 +13,17 @@ #~(modify-phases #$phases (add-after 'configure 'configure-more (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Local/Makefile" - (("# (TRUSTED_CONFIG_LIST=).*" all var) - (string-append var "/etc/exim.conf\n")) - (("# (TRANSPORT_LMTP=yes)" all line) line)))))))))) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Local/Makefile" + ;; Needs two paths to prevent automatic installation. + ;; /etc/exim.conf has to be first or it is never used. + (("(CONFIGURE_FILE=).*" all var) + (string-append var "/etc/exim.conf:" out "/etc/exim.conf\n")) + (("# (TRANSPORT_LMTP=yes)" all line) line))))) + (add-after 'install 'install-config + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outpus "out"))) + (mkdir-p (string-append out "/etc")) + (copy-file "src/configure.default" (string-append out "/etc/exim.conf")) + (substitute* (string-append out "/etc/exim.conf") + (("SYSTEM_ALIASES_FILE") "/etc/aliases"))))))))))) |