semi working
This commit is contained in:
parent
47a8407bcf
commit
2f857b6892
1 changed files with 42 additions and 6 deletions
|
@ -2,6 +2,39 @@
|
||||||
inherit (config) conf;
|
inherit (config) conf;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
in mkIf conf.mail.enable {
|
in mkIf conf.mail.enable {
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"webadmin.chpu.eu" = {
|
||||||
|
serverAliases = [
|
||||||
|
"mta-sts.chpu.eu"
|
||||||
|
"autoconfig.chpu.eu"
|
||||||
|
"autodiscover.chpu.eu"
|
||||||
|
"mail.chpu.eu"
|
||||||
|
];
|
||||||
|
locations."/".proxyPass = "http://localhost:8080";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
streamConfig = ''
|
||||||
|
server {
|
||||||
|
listen 25 proxy_protocol;
|
||||||
|
proxy_pass 127.0.0.1:10025;
|
||||||
|
proxy_protocol on;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 993 proxy_protocol;
|
||||||
|
proxy_pass 127.0.0.1:10993;
|
||||||
|
proxy_protocol on;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 465 proxy_protocol;
|
||||||
|
proxy_pass 127.0.0.1:10465;
|
||||||
|
proxy_protocol on;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.stalwart-mail = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
@ -11,24 +44,27 @@ in mkIf conf.mail.enable {
|
||||||
tls = {
|
tls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
implicit = true;
|
implicit = true;
|
||||||
|
};
|
||||||
|
proxy = {
|
||||||
|
|
||||||
};
|
};
|
||||||
listener = {
|
listener = {
|
||||||
smtp = {
|
smtp = {
|
||||||
protocol = "smtp";
|
protocol = "smtp";
|
||||||
bind = "[::]:25";
|
bind = "[::]:10025";
|
||||||
};
|
};
|
||||||
submissions = {
|
submissions = {
|
||||||
protocol = "smtp";
|
protocol = "smtp";
|
||||||
bind = "[::]:465";
|
bind = "[::]:10465";
|
||||||
};
|
};
|
||||||
imaps = {
|
imaps = {
|
||||||
protocol = "imap";
|
protocol = "imap";
|
||||||
bind = "[::]:993";
|
bind = "[::]:10993";
|
||||||
};
|
};
|
||||||
jmap = {
|
jmap = {
|
||||||
protocol = "jmap";
|
protocol = "jmap";
|
||||||
bind = "[::]:8080";
|
bind = "[::]:8080";
|
||||||
url = "https://chpu.eu";
|
url = "https://mail.chpu.eu";
|
||||||
};
|
};
|
||||||
management = {
|
management = {
|
||||||
protocol = "http";
|
protocol = "http";
|
||||||
|
@ -48,7 +84,7 @@ in mkIf conf.mail.enable {
|
||||||
mechanism = "[plain]";
|
mechanism = "[plain]";
|
||||||
directory = "'in-memory'";
|
directory = "'in-memory'";
|
||||||
};
|
};
|
||||||
storage.directory = "'in-memory'";
|
storage.directory = "in-memory";
|
||||||
session.rcpt.directory = "'in-memory'";
|
session.rcpt.directory = "'in-memory'";
|
||||||
queue.outbound.next-hop = "'local'";
|
queue.outbound.next-hop = "'local'";
|
||||||
directory."imap".lookup.demains = [ "chpu.eu" ];
|
directory."imap".lookup.demains = [ "chpu.eu" ];
|
||||||
|
@ -57,7 +93,7 @@ in mkIf conf.mail.enable {
|
||||||
principals = [
|
principals = [
|
||||||
{
|
{
|
||||||
class = "individual";
|
class = "individual";
|
||||||
name = "Mira Chacku Purakal";
|
name = "mira";
|
||||||
secret = "%{file:/root/email-mira-passwd}%";
|
secret = "%{file:/root/email-mira-passwd}%";
|
||||||
email = [ "mira@chpu.eu" ];
|
email = [ "mira@chpu.eu" ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue