diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-11-07 13:19:17 +0100 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-11-07 13:19:17 +0100 |
commit | f0ab198279a86aaed6195032374e41074cd6b5e3 (patch) | |
tree | 621835740e5ce1b5d8928ff4154d424276a6df0a | |
parent | 853351a9738b18d9bdde789d63d3727c1a7e680f (diff) | |
download | nixos-f0ab198279a86aaed6195032374e41074cd6b5e3.tar nixos-f0ab198279a86aaed6195032374e41074cd6b5e3.tar.gz nixos-f0ab198279a86aaed6195032374e41074cd6b5e3.tar.bz2 nixos-f0ab198279a86aaed6195032374e41074cd6b5e3.tar.xz nixos-f0ab198279a86aaed6195032374e41074cd6b5e3.zip |
mail system cleanup
-rw-r--r-- | ymir.nix | 41 |
1 files changed, 25 insertions, 16 deletions
@@ -392,10 +392,11 @@ in rec { | |||
392 | # 10 GiB | 392 | # 10 GiB |
393 | mailbox_size_limit = 10737418240 | 393 | mailbox_size_limit = 10737418240 |
394 | 394 | ||
395 | mailbox_command = ${pkgs.dovecot}/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" | 395 | mailbox_transport = lmtp:unix:private/dovecot-lmtp |
396 | #mailbox_command = ${pkgs.dovecot}/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" | ||
396 | 397 | ||
397 | smtpd_sasl_type = dovecot | 398 | smtpd_sasl_type = dovecot |
398 | smtpd_sasl_path = auth | 399 | smtpd_sasl_path = private/dovecot-auth |
399 | 400 | ||
400 | smtpd_sasl_auth_enable = yes | 401 | smtpd_sasl_auth_enable = yes |
401 | smtpd_sasl_security_options = noanonymous, noplaintext | 402 | smtpd_sasl_security_options = noanonymous, noplaintext |
@@ -410,13 +411,13 @@ in rec { | |||
410 | reject_unauth_pipelining, | 411 | reject_unauth_pipelining, |
411 | reject_non_fqdn_recipient, | 412 | reject_non_fqdn_recipient, |
412 | reject_unknown_recipient_domain, | 413 | reject_unknown_recipient_domain, |
413 | check_policy_service unix:private/policy-quota, | ||
414 | permit_mynetworks, | 414 | permit_mynetworks, |
415 | permit_sasl_authenticated, | 415 | permit_sasl_authenticated, |
416 | reject_non_fqdn_helo_hostname, | 416 | reject_non_fqdn_helo_hostname, |
417 | reject_invalid_helo_hostname, | 417 | reject_invalid_helo_hostname, |
418 | reject_unknown_reverse_client_hostname, | 418 | reject_unknown_reverse_client_hostname, |
419 | reject_unauth_destination, | 419 | reject_unauth_destination, |
420 | reject_unverified_recipient, | ||
420 | check_client_access regexp:${pkgs.writeText "spfpolicy" '' | 421 | check_client_access regexp:${pkgs.writeText "spfpolicy" '' |
421 | /(^|\.)tu-muenchen\.de$/ DUNNO | 422 | /(^|\.)tu-muenchen\.de$/ DUNNO |
422 | /(^|\.)tum\.de$/ DUNNO | 423 | /(^|\.)tum\.de$/ DUNNO |
@@ -519,7 +520,7 @@ in rec { | |||
519 | services.dovecot2 = { | 520 | services.dovecot2 = { |
520 | enable = true; | 521 | enable = true; |
521 | enableImap = true; | 522 | enableImap = true; |
522 | enableLmtp = false; | 523 | enableLmtp = true; |
523 | enablePop3 = false; | 524 | enablePop3 = false; |
524 | enablePAM = true; | 525 | enablePAM = true; |
525 | sslServerCert = "/var/lib/acme/yggdrasil.li/fullchain.pem"; | 526 | sslServerCert = "/var/lib/acme/yggdrasil.li/fullchain.pem"; |
@@ -531,8 +532,16 @@ in rec { | |||
531 | postmaster_address = postmaster@yggdrasil.li | 532 | postmaster_address = postmaster@yggdrasil.li |
532 | 533 | ||
533 | service auth { | 534 | service auth { |
534 | unix_listener /var/lib/postfix/queue/auth { | 535 | unix_listener /var/lib/postfix/queue/private/dovecot-auth { |
535 | mode = 0660 | 536 | mode = 0600 |
537 | user = postfix | ||
538 | group = postfix | ||
539 | } | ||
540 | } | ||
541 | |||
542 | service lmtp { | ||
543 | unix_listener /var/lib/postfix/queue/private/dovecot-lmtp { | ||
544 | mode = 0600 | ||
536 | user = postfix | 545 | user = postfix |
537 | group = postfix | 546 | group = postfix |
538 | } | 547 | } |
@@ -552,16 +561,16 @@ in rec { | |||
552 | quota_status_nouser = DUNNO | 561 | quota_status_nouser = DUNNO |
553 | } | 562 | } |
554 | 563 | ||
555 | service quota-status { | 564 | # service quota-status { |
556 | executable = quota-status -p postfix | 565 | # executable = quota-status -p postfix |
557 | unix_listener /var/lib/postfix/queue/private/policy-quota { | 566 | # unix_listener /var/lib/postfix/queue/private/policy-quota { |
558 | mode = 0660 | 567 | # mode = 0660 |
559 | user = postfix | 568 | # user = postfix |
560 | group = postfix | 569 | # group = postfix |
561 | # You can choose any port you want | 570 | # # You can choose any port you want |
562 | } | 571 | # } |
563 | client_limit = 1 | 572 | # client_limit = 1 |
564 | } | 573 | # } |
565 | ''; | 574 | ''; |
566 | }; | 575 | }; |
567 | security.pam.services.dovecot2.text = '' | 576 | security.pam.services.dovecot2.text = '' |