diff options
| author | EuAndreh <eu@euandre.org> | 2020-11-26 15:19:43 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2020-11-26 15:23:18 -0300 |
| commit | 3729da9c6e1e3daaba98aadfb27f1ac364e75bf8 (patch) | |
| tree | 3fb6c1126e3d70e8d8abff1677196dbd7101e9a1 | |
| parent | vps.scm: Add missing use for unattended upgrades (diff) | |
| download | server-3729da9c6e1e3daaba98aadfb27f1ac364e75bf8.tar.gz server-3729da9c6e1e3daaba98aadfb27f1ac364e75bf8.tar.xz | |
vps.scm: Start setting up OpenSMTPD configuration
| -rw-r--r-- | sync/vps.scm | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/sync/vps.scm b/sync/vps.scm index a243f03..3a7f2e1 100644 --- a/sync/vps.scm +++ b/sync/vps.scm @@ -1,4 +1,5 @@ -(use-modules (gnu)) +(use-modules (gnu) + (ice-9 textual-ports)) (use-service-modules networking ssh mcron admin) (use-package-modules ssh backup) @@ -11,6 +12,29 @@ root ALL=(ALL) ALL %wheel ALL=NOPASSWD: ALL\n") +(define tld + (string-trim-both (call-with-input-file "tld.txt" get-string-all))) + +(define mail-domain + (string-append "mail." tld)) + +(define aliases-file + (mixed-text-file "euandreh-aliases" " +postmaster root + +@ " user)) + +(define opensmtpd-config + (mixed-text-file "euandreh-smtpd.conf" " +listen on eth0 +table aliases file:/etc/aliases +accept from any domain " mail-domain " alias <aliases> deliver to maildir +accept for local alias <aliases> deliver to maildir +accept for any relay + +pki " mail-domain " cert \"/etc/letsencrypt/live/" mail-domain "/fullchain.pem\" +pki " mail-domain " key \"/etc/letsencrypt/live/" mail-domain "/privkey.pem\"")) + (operating-system (locale "fr_FR.UTF-8") (timezone "America/Sao_Paulo") @@ -41,7 +65,11 @@ root ALL=(ALL) ALL (mcron-configuration (jobs (list)))) (service unattended-upgrade-service-type) - (service dhcp-client-service-type)) + (service dhcp-client-service-type) +; (service opensmtdp-service-type +; (opensmtpd-configuration +; (config-file opensmtpd-config))) +) %base-services)) (bootloader (bootloader-configuration |
