mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
Updated test
This commit is contained in:
parent
9930433d21
commit
35b47f4698
2 changed files with 43 additions and 2 deletions
41
tests/example_emls/dmarc_quarantine.eml
Normal file
41
tests/example_emls/dmarc_quarantine.eml
Normal file
|
@ -0,0 +1,41 @@
|
|||
X-SimpleLogin-Client-IP: 54.39.200.130
|
||||
Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=34.59.200.130;
|
||||
helo=relay.somewhere.net; envelope-from=everwaste@gmail.com;
|
||||
receiver=<UNKNOWN>
|
||||
Received: from relay.somewhere.net (relay.somewhere.net [34.59.200.130])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mx1.sldev.ovh (Postfix) with ESMTPS id 6D8C13F069
|
||||
for <wehrman_mannequin@sldev.ovh>; Thu, 17 Mar 2022 16:50:20 +0000 (UTC)
|
||||
Date: Thu, 17 Mar 2022 16:50:18 +0000
|
||||
To: {{ alias_email }}
|
||||
From: spoofedemailsource@gmail.com
|
||||
Subject: test Thu, 17 Mar 2022 16:50:18 +0000
|
||||
Message-Id: <20220317165018.000191@somewhere-5488dd4b6b-7crp6>
|
||||
X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
|
||||
X-Rspamd-Queue-Id: 6D8C13F069
|
||||
X-Rspamd-Server: staging1
|
||||
X-Spamd-Result: default: False [0.50 / 13.00];
|
||||
MID_RHS_NOT_FQDN(0.50)[];
|
||||
DMARC_POLICY_QUARANTINE(0.10)[gmail.com : No valid SPF, No valid DKIM,none];
|
||||
MIME_GOOD(-0.10)[text/plain];
|
||||
MIME_TRACE(0.00)[0:+];
|
||||
FROM_EQ_ENVFROM(0.00)[];
|
||||
ASN(0.00)[asn:16276, ipnet:34.59.0.0/16, country:FR];
|
||||
R_DKIM_NA(0.00)[];
|
||||
RCVD_COUNT_ZERO(0.00)[0];
|
||||
FREEMAIL_ENVFROM(0.00)[gmail.com];
|
||||
FROM_NO_DN(0.00)[];
|
||||
R_SPF_SOFTFAIL(0.00)[~all];
|
||||
FORCE_ACTION_SL_SPF_FAIL_ADD_HEADER(0.00)[add header];
|
||||
RCPT_COUNT_ONE(0.00)[1];
|
||||
FREEMAIL_FROM(0.00)[gmail.com];
|
||||
TO_DN_NONE(0.00)[];
|
||||
TO_MATCH_ENVRCPT_ALL(0.00)[];
|
||||
ARC_NA(0.00)[]
|
||||
X-Rspamd-Pre-Result: action=add header;
|
||||
module=force_actions;
|
||||
unknown reason
|
||||
X-Spam: Yes
|
||||
|
||||
This is a test mailing
|
|
@ -67,10 +67,10 @@ def test_is_automatic_out_of_office():
|
|||
assert is_automatic_out_of_office(msg)
|
||||
|
||||
|
||||
def test_process_spoofed(flask_client):
|
||||
def test_dmarc_quarantine(flask_client):
|
||||
user = create_random_user()
|
||||
alias = Alias.create_new_random(user)
|
||||
msg = load_eml_file("gmail_spoof.eml", {"alias_email": alias.email})
|
||||
msg = load_eml_file("dmarc_quarantine.eml", {"alias_email": alias.email})
|
||||
envelope = Envelope()
|
||||
envelope.mail_from = msg["from"]
|
||||
envelope.rcpt_tos = [msg["to"]]
|
||||
|
|
Loading…
Reference in a new issue