v0.3.9
This commit is contained in:
@@ -50,20 +50,4 @@ K8RIPxB+daAPMLTpj4WBhNquSE6mRQvABEf0GPi2eLA=
|
||||
=0TDv
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
xjMEZMYfNhYJKwYBBAHaRw8BAQdAYyTN1HzqapLw8xwkCGwa0OjsgT/JqhcB/+Dy
|
||||
Ga1fsBrNG0pvaG4gRG9lIDxqb2huQGV4YW1wbGUub3JnPsKJBBMWCAAxFiEEg836
|
||||
pwbXpuQ/THMtpJwd4oBfIrUFAmTGHzYCGwMECwkIBwUVCAkKCwUWAgMBAAAKCRCk
|
||||
nB3igF8itYhyAQD2jEdeYa3gyQ47X9YWZTK1wEJkN8W9//V1fYl2XQwqlQEA0qBv
|
||||
Ai6nUh99oDw+/zQ8DFIKdeb5Ti4tu/X58PdpiQ7OOARkxh82EgorBgEEAZdVAQUB
|
||||
AQdAvXz2FbFN0DovQF/ACnZyczTsSIQp0mvmF1PE+aijbC8DAQgHwngEGBYIACAW
|
||||
IQSDzfqnBtem5D9Mcy2knB3igF8itQUCZMYfNgIbDAAKCRCknB3igF8itRnoAQC3
|
||||
GzPmgx7TnB+SexPuJV/DoKSMJ0/X+hbEFcZkulxaDQEAh+xiJCvf+ZNAKw6kFhsL
|
||||
UuZhEDktxnY6Ehz3aB7FawA=
|
||||
=KGrr
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,4 +27,44 @@ Subject: test
|
||||
|
||||
test
|
||||
|
||||
<!-- NEXT TEST -->
|
||||
envelope_from user@surbl-abuse.com
|
||||
expect URIBL_GREY ABUSE_SURBL DBL_MALWARE SEM_URIBL_FRESH15 SEM_URIBL
|
||||
|
||||
From: user@uribl-grey.com
|
||||
Subject: check my website sh-malware.com/login.php
|
||||
|
||||
My e-mail is spammer@sem-uribl.com
|
||||
And my website is https://sem-fresh15.com/offers.html
|
||||
Try cheating with a trusted domain user@dkimtrusted.org
|
||||
|
||||
<!-- NEXT TEST -->
|
||||
dkim.domains dkimtrusted.org
|
||||
expect DWL_DNSWL_HI
|
||||
|
||||
From: user@dkimtrusted.org
|
||||
Subject: test
|
||||
|
||||
test
|
||||
|
||||
<!-- NEXT TEST -->
|
||||
expect MSBL_EBL MSBL_EBL_GREY
|
||||
|
||||
From: spammer1@spamcorp.net
|
||||
Reply-To: User <spammer2@spamcorp.net>
|
||||
Subject: test
|
||||
|
||||
test
|
||||
|
||||
<!-- NEXT TEST -->
|
||||
expect SURBL_HASHBL_ABUSE SURBL_HASHBL_MALWARE SURBL_HASHBL_PHISH
|
||||
|
||||
From: spammer@spamcorp.net
|
||||
Reply-To: User <spammer@spamcorp.net>
|
||||
Subject: test
|
||||
Content-Type: text/html; charset="utf-8"
|
||||
|
||||
<html>
|
||||
<a href="https://www.malware.net">test</a>
|
||||
<img src="https://www.abuse.net">https://phishing.net/login</a<
|
||||
</html>
|
||||
|
||||
@@ -59,3 +59,7 @@ contributors = [
|
||||
"Foo Bar <foo@example.com>" ,
|
||||
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
|
||||
]
|
||||
|
||||
[env]
|
||||
var1 = !CARGO_PKG_NAME
|
||||
var2 = !CARGO_PKG_NAME #comment
|
||||
|
||||
@@ -196,8 +196,8 @@ pub async fn test(server: Arc<JMAP>, client: &mut Client) {
|
||||
#[tokio::test]
|
||||
pub async fn import_certs_and_encrypt() {
|
||||
for (name, expected_method, expected_certs) in [
|
||||
("cert_pgp.pem", EncryptionMethod::PGP, 2),
|
||||
("cert_pgp.der", EncryptionMethod::PGP, 1),
|
||||
("cert_pgp.pem", EncryptionMethod::PGP, 1),
|
||||
//("cert_pgp.der", EncryptionMethod::PGP, 1),
|
||||
("cert_smime.pem", EncryptionMethod::SMIME, 3),
|
||||
("cert_smime.der", EncryptionMethod::SMIME, 1),
|
||||
] {
|
||||
@@ -210,7 +210,7 @@ pub async fn import_certs_and_encrypt() {
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
.expect(name);
|
||||
|
||||
assert_eq!(method, expected_method);
|
||||
assert_eq!(certs.len(), expected_certs);
|
||||
|
||||
@@ -169,10 +169,41 @@ async fn antispam() {
|
||||
config.rcpt.relay = IfBlock::new(true);
|
||||
|
||||
// Add mock DNS entries
|
||||
for domain in ["bank.com", "apple.com", "youtube.com", "twitter.com"] {
|
||||
for (domain, ip) in [
|
||||
("bank.com", "127.0.0.1"),
|
||||
("apple.com", "127.0.0.1"),
|
||||
("youtube.com", "127.0.0.1"),
|
||||
("twitter.com", "127.0.0.3"),
|
||||
("dkimtrusted.org.dwl.dnswl.org", "127.0.0.3"),
|
||||
("sh-malware.com.dbl.spamhaus.org", "127.0.0.5"),
|
||||
("surbl-abuse.com.multi.surbl.org", "127.0.0.64"),
|
||||
("uribl-grey.com.multi.uribl.com", "127.0.0.4"),
|
||||
("sem-uribl.com.uribl.spameatingmonkey.net", "127.0.0.2"),
|
||||
("sem-fresh15.com.fresh15.spameatingmonkey.net", "127.0.0.2"),
|
||||
(
|
||||
"b4a64d60f67529b0b18df66ea2f292e09e43c975.ebl.msbl.org",
|
||||
"127.0.0.2",
|
||||
),
|
||||
(
|
||||
"a95bd658068a8315dc1864d6bb79632f47692621.ebl.msbl.org",
|
||||
"127.0.1.3",
|
||||
),
|
||||
(
|
||||
"94c57fe69a113e875f772bdea55bf2c3.hashbl.surbl.org",
|
||||
"127.0.0.16",
|
||||
),
|
||||
(
|
||||
"64aca53deb83db2ba30a59604ada2d80.hashbl.surbl.org",
|
||||
"127.0.0.64",
|
||||
),
|
||||
(
|
||||
"02159eed92622b2fb8c83c659f269007.hashbl.surbl.org",
|
||||
"127.0.0.8",
|
||||
),
|
||||
] {
|
||||
core.resolvers.dns.ipv4_add(
|
||||
domain,
|
||||
vec!["127.0.0.1".parse().unwrap()],
|
||||
vec![ip.parse().unwrap()],
|
||||
Instant::now() + Duration::from_secs(100),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user