email: add listeners
This commit is contained in:
parent
dc34a72853
commit
1447f86c3a
2 changed files with 22 additions and 13 deletions
|
@ -18,9 +18,6 @@ in {
|
|||
enable = true;
|
||||
domain = email-domain;
|
||||
ports = {
|
||||
smtp = 25;
|
||||
imaps = 993;
|
||||
smtps = 465;
|
||||
local = 9000;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,12 +26,6 @@ in
|
|||
|
||||
users.users."stalwart-mail".extraGroups = ["nginx"];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
cfg.ports.imaps
|
||||
cfg.ports.smtps
|
||||
cfg.ports.smtp
|
||||
];
|
||||
|
||||
services.stalwart-mail = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
@ -44,20 +38,38 @@ in
|
|||
hostname = cfg.domain;
|
||||
tls = {
|
||||
enable = true;
|
||||
implicit = true;
|
||||
};
|
||||
listener = {
|
||||
smtp = {
|
||||
protocol = "smtp";
|
||||
bind = ["[::]:${toString cfg.ports.smtp}"];
|
||||
bind = ["[::]:25"];
|
||||
};
|
||||
lmtp = {
|
||||
protocol = "lmtp";
|
||||
bind = ["[::]:24"];
|
||||
};
|
||||
jmap = {
|
||||
protocol = "http";
|
||||
bind = ["[::]:8080"];
|
||||
tls.implicit = true;
|
||||
};
|
||||
imap = {
|
||||
protocol = "imap";
|
||||
bind = ["[::]:143"];
|
||||
};
|
||||
imaps = {
|
||||
protocol = "imap";
|
||||
bind = ["[::]:${toString cfg.ports.imaps}"];
|
||||
bind = ["[::]:993"];
|
||||
tls.implicit = true;
|
||||
};
|
||||
submission = {
|
||||
protocol = "smtp";
|
||||
bind = ["[::]:587"];
|
||||
};
|
||||
submissions = {
|
||||
protocol = "smtp";
|
||||
bind = ["[::]:${toString cfg.ports.smtps}"];
|
||||
bind = ["[::]:465"];
|
||||
tls.implicit = true;
|
||||
};
|
||||
management = {
|
||||
protocol = "http";
|
||||
|
|
Loading…
Add table
Reference in a new issue