Merge pull request #16082 from uwap/master
Postfix: Add an option to enable Submission
This commit is contained in:
commit
61dba074c7
@ -127,11 +127,11 @@ let
|
|||||||
# (yes) (yes) (no) (never) (100)
|
# (yes) (yes) (no) (never) (100)
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
smtp inet n - n - - smtpd
|
smtp inet n - n - - smtpd
|
||||||
#submission inet n - n - - smtpd
|
'' + optionalString cfg.enableSubmission ''
|
||||||
# -o smtpd_tls_security_level=encrypt
|
submission inet n - n - - smtpd
|
||||||
# -o smtpd_sasl_auth_enable=yes
|
${concatStringsSep "\n " (mapAttrsToList (x: y: "-o " + x + "=" + y) cfg.submissionOptions)}
|
||||||
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
''
|
||||||
# -o milter_macro_daemon_name=ORIGINATING
|
+ ''
|
||||||
pickup unix n - n 60 1 pickup
|
pickup unix n - n 60 1 pickup
|
||||||
cleanup unix n - n - 0 cleanup
|
cleanup unix n - n - 0 cleanup
|
||||||
qmgr unix n - n 300 1 qmgr
|
qmgr unix n - n 300 1 qmgr
|
||||||
@ -202,6 +202,28 @@ in
|
|||||||
description = "Whether to enable smtp in master.cf.";
|
description = "Whether to enable smtp in master.cf.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableSubmission = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable smtp submission";
|
||||||
|
};
|
||||||
|
|
||||||
|
submissionOptions = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
default = { "smtpd_tls_security_level" = "encrypt";
|
||||||
|
"smtpd_sasl_auth_enable" = "yes";
|
||||||
|
"smtpd_client_restrictions" = "permit_sasl_authenticated,reject";
|
||||||
|
"milter_macro_daemon_name" = "ORIGINATING";
|
||||||
|
};
|
||||||
|
description = "Options for the submission config in master.cf";
|
||||||
|
example = { "smtpd_tls_security_level" = "encrypt";
|
||||||
|
"smtpd_sasl_auth_enable" = "yes";
|
||||||
|
"smtpd_sasl_type" = "dovecot";
|
||||||
|
"smtpd_client_restrictions" = "permit_sasl_authenticated,reject";
|
||||||
|
"milter_macro_daemon_name" = "ORIGINATING";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
setSendmail = mkOption {
|
setSendmail = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user