mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Postfix: Add an option to enable Submission
Adds services.postfix.enableSubmission and services.postfix.extraSubmissionOptions to make it easy to enable submission in master.cf
This commit is contained in:
parent
e3358c1951
commit
d1e4ee146d
1 changed files with 21 additions and 5 deletions
|
@ -127,11 +127,14 @@ 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
|
-o smtpd_tls_security_level=encrypt
|
||||||
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
-o smtpd_sasl_auth_enable=yes
|
||||||
# -o milter_macro_daemon_name=ORIGINATING
|
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||||
|
${cfg.extraSubmissionOptions}
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
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
|
||||||
|
@ -201,6 +204,19 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
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 in master.cf.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraSubmissionOptions = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "Extra options for the submission config in master.cf.";
|
||||||
|
example = "-o milter_macro_daemon_name=ORIGINATING";
|
||||||
|
};
|
||||||
|
|
||||||
setSendmail = mkOption {
|
setSendmail = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
Loading…
Reference in a new issue