works now
This commit is contained in:
parent
1d33c05128
commit
1bc8ea24df
1 changed files with 8 additions and 29 deletions
|
@ -11,6 +11,7 @@ in
|
||||||
virtualHosts."chpu.eu" = {
|
virtualHosts."chpu.eu" = {
|
||||||
serverName = "chpu.eu";
|
serverName = "chpu.eu";
|
||||||
serverAliases = [
|
serverAliases = [
|
||||||
|
"mail.chpu.eu"
|
||||||
"webadmin.chpu.eu"
|
"webadmin.chpu.eu"
|
||||||
"autoconfig.chpu.eu"
|
"autoconfig.chpu.eu"
|
||||||
"autodiscover.chpu.eu"
|
"autodiscover.chpu.eu"
|
||||||
|
@ -23,34 +24,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
streamConfig = ''
|
|
||||||
# Proxy SMTP
|
|
||||||
server {
|
|
||||||
listen 25 proxy_protocol;
|
|
||||||
proxy_pass 127.0.0.1:10025;
|
|
||||||
proxy_protocol on;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Proxy IMAPS
|
|
||||||
server {
|
|
||||||
listen 993 proxy_protocol;
|
|
||||||
proxy_pass 127.0.0.1:10993;
|
|
||||||
proxy_protocol on;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Proxy SMTPS
|
|
||||||
server {
|
|
||||||
listen 465 proxy_protocol;
|
|
||||||
proxy_pass 127.0.0.1:10465;
|
|
||||||
proxy_protocol on;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users."stalwart-mail".extraGroups = ["nginx"];
|
users.users."stalwart-mail".extraGroups = ["nginx"];
|
||||||
|
|
||||||
services.stalwart-mail = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
settings = {
|
settings = {
|
||||||
config.local-keys = [
|
config.local-keys = [
|
||||||
"certificate.default.cert"
|
"certificate.default.cert"
|
||||||
|
@ -59,23 +39,22 @@ in
|
||||||
];
|
];
|
||||||
server = {
|
server = {
|
||||||
hostname = "chpu.eu";
|
hostname = "chpu.eu";
|
||||||
proxy.trusted-networks = ["127.0.0.0/8" "::1" "10.0.0.0/8"];
|
|
||||||
tls = {
|
tls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
implicit = true;
|
implicit = true;
|
||||||
};
|
};
|
||||||
listener = {
|
listener = {
|
||||||
submissions = {
|
|
||||||
protocol = "smtp";
|
|
||||||
bind = "[::]:465";
|
|
||||||
};
|
|
||||||
smtp = {
|
smtp = {
|
||||||
protocol = "smtp";
|
protocol = "smtp";
|
||||||
bind = "[::]:25";
|
bind = ["[::]:25"];
|
||||||
};
|
};
|
||||||
imaps = {
|
imaps = {
|
||||||
protocol = "imap";
|
protocol = "imap";
|
||||||
bind = "[::]:993";
|
bind = ["[::]:993"];
|
||||||
|
};
|
||||||
|
submissions = {
|
||||||
|
protocol = "smtp";
|
||||||
|
bind = ["[::]:465"];
|
||||||
};
|
};
|
||||||
management = {
|
management = {
|
||||||
protocol = "http";
|
protocol = "http";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue