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,22 +148,41 @@ in
|
||||||
specialUse = "Trash";
|
specialUse = "Trash";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
modules = [
|
||||||
|
pkgs.dovecot_pigeonhole
|
||||||
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
passdb {
|
auth_username_format = %Ln
|
||||||
driver = ldap
|
passdb {
|
||||||
args = ${dovecot-ldap-args}
|
driver = ldap
|
||||||
}
|
args = ${dovecot-ldap-args}
|
||||||
userdb {
|
}
|
||||||
driver = ldap
|
userdb {
|
||||||
args = ${dovecot-ldap-args}
|
driver = ldap
|
||||||
}
|
args = ${dovecot-ldap-args}
|
||||||
service auth {
|
}
|
||||||
unix_listener /var/lib/postfix/auth {
|
service auth {
|
||||||
group = postfix
|
unix_listener /var/lib/postfix/auth {
|
||||||
mode = 0660
|
group = postfix
|
||||||
user = postfix
|
mode = 0660
|
||||||
}
|
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