tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Make submission options more flexible
uwap
9 years ago
cc658b69
d1e4ee14
+10
-10
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
mail
postfix.nix
+10
-10
nixos/modules/services/mail/postfix.nix
···
129
129
smtp inet n - n - - smtpd
130
130
'' + optionalString cfg.enableSubmission ''
131
131
submission inet n - n - - smtpd
132
132
-
-o smtpd_tls_security_level=encrypt
133
133
-
-o smtpd_sasl_auth_enable=yes
134
134
-
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
135
135
-
${cfg.extraSubmissionOptions}
132
132
+
${concatStringsSep "\n " (mapAttrsToList (x: y: "-o " + x + "=" + y) cfg.submissionOptions)}
136
133
''
137
134
+ ''
138
135
pickup unix n - n 60 1 pickup
···
208
205
enableSubmission = mkOption {
209
206
type = types.bool;
210
207
default = false;
211
211
-
description = "Whether to enable smtp submission in master.cf.";
208
208
+
description = "Whether to enable smtp submission";
212
209
};
213
210
214
214
-
extraSubmissionOptions = mkOption {
215
215
-
type = types.str;
216
216
-
default = "";
217
217
-
description = "Extra options for the submission config in master.cf.";
218
218
-
example = "-o milter_macro_daemon_name=ORIGINATING";
211
211
+
submissionOptions = mkOption {
212
212
+
type = types.attrs;
213
213
+
default = { "smtpd_tls_security_level" = "encrypt";
214
214
+
"smtpd_sasl_auth_enable" = "yes";
215
215
+
"smtpd_client_restrictions" = "permit_sasl_authenticated,reject";
216
216
+
};
217
217
+
description = "Options for the submission config in master.cf";
218
218
+
example = { "milter_macro_daemon_name" = "ORIGINATING"; };
219
219
};
220
220
221
221
setSendmail = mkOption {