add test for valiases
This commit is contained in:
parent
67c29a561c
commit
a7396c5b25
1 changed files with 23 additions and 0 deletions
|
@ -31,9 +31,11 @@ import <nixpkgs/nixos/tests/make-test.nix> {
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"user1@example.com" = {
|
"user1@example.com" = {
|
||||||
hashedPassword = "$6$/z4n8AQl6K$kiOkBTWlZfBd7PvF5GsJ8PmPgdZsFGN1jPGZufxxr60PoR0oUsrvzm2oQiflyz5ir9fFJ.d/zKm/NgLXNUsNX/";
|
hashedPassword = "$6$/z4n8AQl6K$kiOkBTWlZfBd7PvF5GsJ8PmPgdZsFGN1jPGZufxxr60PoR0oUsrvzm2oQiflyz5ir9fFJ.d/zKm/NgLXNUsNX/";
|
||||||
|
aliases = [ "postmaster@example.com" ];
|
||||||
};
|
};
|
||||||
"user2@example.com" = {
|
"user2@example.com" = {
|
||||||
hashedPassword = "$6$u61JrAtuI0a$nGEEfTP5.eefxoScUGVG/Tl0alqla2aGax4oTd85v3j3xSmhv/02gNfSemv/aaMinlv9j/ZABosVKBrRvN5Qv0";
|
hashedPassword = "$6$u61JrAtuI0a$nGEEfTP5.eefxoScUGVG/Tl0alqla2aGax4oTd85v3j3xSmhv/02gNfSemv/aaMinlv9j/ZABosVKBrRvN5Qv0";
|
||||||
|
aliases = [ "chuck@example.com" ];
|
||||||
};
|
};
|
||||||
"user@example2.com" = {
|
"user@example2.com" = {
|
||||||
hashedPassword = "$6$u61JrAtuI0a$nGEEfTP5.eefxoScUGVG/Tl0alqla2aGax4oTd85v3j3xSmhv/02gNfSemv/aaMinlv9j/ZABosVKBrRvN5Qv0";
|
hashedPassword = "$6$u61JrAtuI0a$nGEEfTP5.eefxoScUGVG/Tl0alqla2aGax4oTd85v3j3xSmhv/02gNfSemv/aaMinlv9j/ZABosVKBrRvN5Qv0";
|
||||||
|
@ -78,6 +80,13 @@ import <nixpkgs/nixos/tests/make-test.nix> {
|
||||||
from user\@example2.com
|
from user\@example2.com
|
||||||
user user\@example2.com
|
user user\@example2.com
|
||||||
password user2
|
password user2
|
||||||
|
|
||||||
|
account test3
|
||||||
|
host SERVER
|
||||||
|
port 587
|
||||||
|
from chuck\@example.com
|
||||||
|
user user2\@example.com
|
||||||
|
password user2
|
||||||
'';
|
'';
|
||||||
email1 =
|
email1 =
|
||||||
''
|
''
|
||||||
|
@ -160,5 +169,19 @@ import <nixpkgs/nixos/tests/make-test.nix> {
|
||||||
# make sure it is dkim signed
|
# make sure it is dkim signed
|
||||||
$client->succeed("grep DKIM ~/mail/*");
|
$client->succeed("grep DKIM ~/mail/*");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
subtest "aliases", sub {
|
||||||
|
$client->succeed("rm ~/mail/*");
|
||||||
|
$client->succeed("rm mail.txt");
|
||||||
|
$client->succeed("echo '${email2}' > mail.txt");
|
||||||
|
# send email from chuck to postmaster
|
||||||
|
$client->succeed("msmtp -a test3 --tls=on --tls-certcheck=off --auth=on postmaster\@example.com < mail.txt >&2");
|
||||||
|
$client->succeed("sleep 5");
|
||||||
|
# fetchmail returns EXIT_CODE 0 when it retrieves mail
|
||||||
|
$client->succeed("fetchmail -v");
|
||||||
|
};
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue