diff options
Diffstat (limited to 'hosts/sif/mail/default.nix')
| -rw-r--r-- | hosts/sif/mail/default.nix | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/hosts/sif/mail/default.nix b/hosts/sif/mail/default.nix deleted file mode 100644 index 8d6cd705..00000000 --- a/hosts/sif/mail/default.nix +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | { config, lib, pkgs, ... }: | ||
| 2 | { | ||
| 3 | services.postfix = { | ||
| 4 | enable = true; | ||
| 5 | enableSmtp = true; | ||
| 6 | enableSubmission = false; | ||
| 7 | setSendmail = true; | ||
| 8 | networksStyle = "host"; | ||
| 9 | hostname = "sif.midgard.yggdrasil"; | ||
| 10 | destination = []; | ||
| 11 | relayHost = "uucp:ymir"; | ||
| 12 | recipientDelimiter = "+"; | ||
| 13 | masterConfig = { | ||
| 14 | uucp = { | ||
| 15 | type = "unix"; | ||
| 16 | private = true; | ||
| 17 | privileged = true; | ||
| 18 | chroot = false; | ||
| 19 | command = "pipe"; | ||
| 20 | args = [ "flags=Fqhu" "user=uucp" ''argv=${config.security.wrapperDir}/uux -z -a $sender - $nexthop!rmail ($recipient)'' ]; | ||
| 21 | }; | ||
| 22 | smtps = { | ||
| 23 | type = "unix"; | ||
| 24 | private = true; | ||
| 25 | privileged = true; | ||
| 26 | chroot = false; | ||
| 27 | command = "smtp"; | ||
| 28 | args = [ "-o" "smtp_tls_wrappermode=yes" "-o" "smtp_tls_security_level=encrypt" ]; | ||
| 29 | }; | ||
| 30 | }; | ||
| 31 | config = { | ||
| 32 | default_transport = "uucp:ymir"; | ||
| 33 | |||
| 34 | inet_interfaces = "loopback-only"; | ||
| 35 | |||
| 36 | authorized_submit_users = ["!uucp" "static:anyone"]; | ||
| 37 | message_size_limit = "0"; | ||
| 38 | |||
| 39 | sender_dependent_default_transport_maps = ''regexp:${pkgs.writeText "sender_relay" '' | ||
| 40 | /@(cip|stud)\.ifi\.(lmu|uni-muenchen)\.de$/ smtp:smtp.ifi.lmu.de | ||
| 41 | /@ifi\.(lmu|uni-muenchen)\.de$/ smtp:smtpin1.ifi.lmu.de:587 | ||
| 42 | /@math(ematik)?\.(lmu|uni-muenchen)\.de$/ smtps:smtp.math.lmu.de:465 | ||
| 43 | /@(campus\.)?lmu\.de$/ smtp:postout.lrz.de | ||
| 44 | ''}''; | ||
| 45 | sender_bcc_maps = ''regexp:${pkgs.writeText "sender_bcc" '' | ||
| 46 | /^uni2work(-[^@]*)?@ifi\.lmu\.de$/ uni2work@ifi.lmu.de | ||
| 47 | /@ifi\.lmu\.de$/ gregor.kleen@ifi.lmu.de | ||
| 48 | ''}''; | ||
| 49 | |||
| 50 | smtp_sasl_auth_enable = true; | ||
| 51 | smtp_sender_dependent_authentication = true; | ||
| 52 | smtp_sasl_tls_security_options = "noanonymous"; | ||
| 53 | smtp_sasl_mechanism_filter = ["plain"]; | ||
| 54 | smtp_sasl_password_maps = "regexp:/var/db/postfix/sasl_passwd"; | ||
| 55 | smtp_cname_overrides_servername = false; | ||
| 56 | smtp_always_send_ehlo = true; | ||
| 57 | smtp_tls_security_level = "dane"; | ||
| 58 | |||
| 59 | smtp_tls_loglevel = "1"; | ||
| 60 | smtp_dns_support_level = "dnssec"; | ||
| 61 | }; | ||
| 62 | }; | ||
| 63 | |||
| 64 | sops.secrets.postfix-sasl-passwd = { | ||
| 65 | key = "sasl-passwd"; | ||
| 66 | path = "/var/db/postfix/sasl_passwd"; | ||
| 67 | owner = "postfix"; | ||
| 68 | sopsFile = ./secrets.yaml; | ||
| 69 | }; | ||
| 70 | } | ||
