aboutsummaryrefslogtreecommitdiffstats
path: root/t/utils/email.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-08 14:13:48 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-14 15:36:27 +0000
commit74a7ed654369cb3ebd282c01d4a0de87a646c4ce (patch)
tree27e5e8090d8a1e3be4e69b9d5344e9fa67ee1b6a /t/utils/email.t
parent7361516252a4d98620f66318cabe75acb3291efb (diff)
Use sender in From if From and To domains match.
To deal with a recipient mail server not allowing inbound email using the same domain as an internal domain, e.g. https://community.mimecast.com/docs/DOC-1419
Diffstat (limited to 't/utils/email.t')
-rw-r--r--t/utils/email.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/utils/email.t b/t/utils/email.t
index 23814c1d7..9e556a865 100644
--- a/t/utils/email.t
+++ b/t/utils/email.t
@@ -31,4 +31,7 @@ is Utils::Email::test_dmarc('BAD'), undef;
is Utils::Email::test_dmarc('test@yahoo.com'), 1;
is Utils::Email::test_dmarc('test@example.net'), undef;
+is Utils::Email::same_domain(['test@example.net', ''], [ ['to@example.net', ''], ['to@example.com', ''] ]), 1;
+is Utils::Email::same_domain(['test@example.org', ''], [ ['to@example.net', ''] ]), '';
+
done_testing();