added sieve
This commit is contained in:
parent
7354c31da8
commit
2d431ff526
|
@ -26,6 +26,7 @@ in
|
||||||
465
|
465
|
||||||
587 # SMTP
|
587 # SMTP
|
||||||
993 # IMAP
|
993 # IMAP
|
||||||
|
4190 # sieve
|
||||||
];
|
];
|
||||||
users.users.postfix.extraGroups = [ "opendkim" ];
|
users.users.postfix.extraGroups = [ "opendkim" ];
|
||||||
|
|
||||||
|
@ -104,6 +105,8 @@ in
|
||||||
smtpd_sasl_path = "/var/lib/postfix/auth";
|
smtpd_sasl_path = "/var/lib/postfix/auth";
|
||||||
smtpd_sasl_type = "dovecot";
|
smtpd_sasl_type = "dovecot";
|
||||||
#mailman stuff
|
#mailman stuff
|
||||||
|
local_transport = "lmtp:unix:/run/dovecot2/dovecot-lmtp";
|
||||||
|
|
||||||
transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ];
|
transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ];
|
||||||
local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" "ldap:${config.sops.secrets."postfix_ldap_aliases".path}" ];
|
local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" "ldap:${config.sops.secrets."postfix_ldap_aliases".path}" ];
|
||||||
};
|
};
|
||||||
|
@ -112,9 +115,21 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
enableImap = true;
|
enableImap = true;
|
||||||
enableQuota = false;
|
enableQuota = false;
|
||||||
|
enableLmtp = true;
|
||||||
mailLocation = "maildir:~/Maildir";
|
mailLocation = "maildir:~/Maildir";
|
||||||
sslServerCert = "/var/lib/acme/${hostname}/fullchain.pem";
|
sslServerCert = "/var/lib/acme/${hostname}/fullchain.pem";
|
||||||
sslServerKey = "/var/lib/acme/${hostname}/key.pem";
|
sslServerKey = "/var/lib/acme/${hostname}/key.pem";
|
||||||
|
protocols = [ "imap" "sieve" ];
|
||||||
|
mailPlugins = {
|
||||||
|
perProtocol = {
|
||||||
|
imap = {
|
||||||
|
enable = [ ];
|
||||||
|
};
|
||||||
|
lmtp = {
|
||||||
|
enable = [ "sieve" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
mailboxes = {
|
mailboxes = {
|
||||||
Spam = {
|
Spam = {
|
||||||
auto = "create";
|
auto = "create";
|
||||||
|
@ -133,7 +148,11 @@ in
|
||||||
specialUse = "Trash";
|
specialUse = "Trash";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
modules = [
|
||||||
|
pkgs.dovecot_pigeonhole
|
||||||
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
auth_username_format = %Ln
|
||||||
passdb {
|
passdb {
|
||||||
driver = ldap
|
driver = ldap
|
||||||
args = ${dovecot-ldap-args}
|
args = ${dovecot-ldap-args}
|
||||||
|
@ -149,6 +168,21 @@ in
|
||||||
user = postfix
|
user = postfix
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
service managesieve-login {
|
||||||
|
inet_listener sieve {
|
||||||
|
port = 4190
|
||||||
|
}
|
||||||
|
|
||||||
|
service_count = 1
|
||||||
|
}
|
||||||
|
service lmtp {
|
||||||
|
unix_listener dovecot-lmtp {
|
||||||
|
group = postfix
|
||||||
|
mode = 0600
|
||||||
|
user = postfix
|
||||||
|
}
|
||||||
|
client_limit = 1
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
opendkim = {
|
opendkim = {
|
||||||
|
|
|
@ -36,6 +36,10 @@ in
|
||||||
SOGoProfileURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_user_profile";
|
SOGoProfileURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_user_profile";
|
||||||
OCSSessionsFolderURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_sessions_folder";
|
OCSSessionsFolderURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_sessions_folder";
|
||||||
OCSFolderInfoURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_folder_info";
|
OCSFolderInfoURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_folder_info";
|
||||||
|
SOGoSieveServer = sieve://127.0.0.1:4190;
|
||||||
|
SOGoSieveScriptsEnabled = YES;
|
||||||
|
SOGoVacationEnabled = YES;
|
||||||
|
SOGoForwardEnabled = YES;
|
||||||
'';
|
'';
|
||||||
configReplaces = {
|
configReplaces = {
|
||||||
"LDAP_SEARCH" = config.sops.secrets.ldap_search.path;
|
"LDAP_SEARCH" = config.sops.secrets.ldap_search.path;
|
||||||
|
|
Loading…
Reference in a new issue