stalwart-mail: fix default configuration and test
This commit is contained in:
parent
cf1efc01d3
commit
cd8aad903c
2 changed files with 16 additions and 8 deletions
|
@ -32,10 +32,15 @@ in {
|
||||||
global.tracing.level = mkDefault "info";
|
global.tracing.level = mkDefault "info";
|
||||||
queue.path = mkDefault "${dataDir}/queue";
|
queue.path = mkDefault "${dataDir}/queue";
|
||||||
report.path = mkDefault "${dataDir}/reports";
|
report.path = mkDefault "${dataDir}/reports";
|
||||||
|
store.db.type = mkDefault "sqlite";
|
||||||
store.db.path = mkDefault "${dataDir}/data/index.sqlite3";
|
store.db.path = mkDefault "${dataDir}/data/index.sqlite3";
|
||||||
store.blob.type = mkDefault "local";
|
store.blob.type = mkDefault "fs";
|
||||||
store.blob.local.path = mkDefault "${dataDir}/data/blobs";
|
store.blob.path = mkDefault "${dataDir}/data/blobs";
|
||||||
|
storage.data = mkDefault "db";
|
||||||
|
storage.fts = mkDefault "db";
|
||||||
|
storage.blob = mkDefault "blob";
|
||||||
resolver.type = mkDefault "system";
|
resolver.type = mkDefault "system";
|
||||||
|
resolver.public-suffix = mkDefault ["https://publicsuffix.org/list/public_suffix_list.dat"];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.stalwart-mail = {
|
systemd.services.stalwart-mail = {
|
||||||
|
@ -57,8 +62,8 @@ in {
|
||||||
KillSignal = "SIGINT";
|
KillSignal = "SIGINT";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
StandardOutput = "syslog";
|
StandardOutput = "journal";
|
||||||
StandardError = "syslog";
|
StandardError = "journal";
|
||||||
SyslogIdentifier = "stalwart-mail";
|
SyslogIdentifier = "stalwart-mail";
|
||||||
|
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
|
@ -42,20 +42,22 @@ in import ./make-test-python.nix ({ lib, ... }: {
|
||||||
|
|
||||||
session.auth.mechanisms = [ "PLAIN" ];
|
session.auth.mechanisms = [ "PLAIN" ];
|
||||||
session.auth.directory = "in-memory";
|
session.auth.directory = "in-memory";
|
||||||
jmap.directory = "in-memory"; # shared with imap
|
storage.directory = "in-memory"; # shared with imap
|
||||||
|
|
||||||
session.rcpt.directory = "in-memory";
|
session.rcpt.directory = "in-memory";
|
||||||
queue.outbound.next-hop = [ "local" ];
|
queue.outbound.next-hop = [ "local" ];
|
||||||
|
|
||||||
directory."in-memory" = {
|
directory."in-memory" = {
|
||||||
type = "memory";
|
type = "memory";
|
||||||
users = [
|
principals = [
|
||||||
{
|
{
|
||||||
|
type = "individual";
|
||||||
name = "alice";
|
name = "alice";
|
||||||
secret = "foobar";
|
secret = "foobar";
|
||||||
email = [ "alice@${domain}" ];
|
email = [ "alice@${domain}" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
type = "individual";
|
||||||
name = "bob";
|
name = "bob";
|
||||||
secret = "foobar";
|
secret = "foobar";
|
||||||
email = [ "bob@${domain}" ];
|
email = [ "bob@${domain}" ];
|
||||||
|
@ -90,8 +92,9 @@ in import ./make-test-python.nix ({ lib, ... }: {
|
||||||
|
|
||||||
with IMAP4('localhost') as imap:
|
with IMAP4('localhost') as imap:
|
||||||
imap.starttls()
|
imap.starttls()
|
||||||
imap.login('bob', 'foobar')
|
status, [caps] = imap.login('bob', 'foobar')
|
||||||
imap.select('"All Mail"')
|
assert status == 'OK'
|
||||||
|
imap.select()
|
||||||
status, [ref] = imap.search(None, 'ALL')
|
status, [ref] = imap.search(None, 'ALL')
|
||||||
assert status == 'OK'
|
assert status == 'OK'
|
||||||
[msgId] = ref.split()
|
[msgId] = ref.split()
|
||||||
|
|
Loading…
Reference in a new issue