diff options
author | dakkar <dakkar@thenautilus.net> | 2025-02-09 13:34:08 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2025-02-09 13:34:08 +0000 |
commit | e365e38c127cfb3e6b40cd60780476449048ad73 (patch) | |
tree | 291fe829ec50744d7cf7dd380cdbb5551235fba9 /t | |
parent | extra dmarc test, just in case (diff) | |
download | Sietima-e365e38c127cfb3e6b40cd60780476449048ad73.tar.gz Sietima-e365e38c127cfb3e6b40cd60780476449048ad73.tar.bz2 Sietima-e365e38c127cfb3e6b40cd60780476449048ad73.zip |
skip rewriting when it's not useful
Diffstat (limited to 't')
-rw-r--r-- | t/tests/sietima/role/nospoof.t | 18 | ||||
-rw-r--r-- | t/tests/sietima/role/nospoof/dmarc.t | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/t/tests/sietima/role/nospoof.t b/t/tests/sietima/role/nospoof.t index 6f30635..b0ec622 100644 --- a/t/tests/sietima/role/nospoof.t +++ b/t/tests/sietima/role/nospoof.t @@ -10,6 +10,10 @@ my $s = make_sietima( ], ); +my $return_path = $s->return_path; +my $return_path_address = $return_path->address; +my $return_path_host = $return_path->host; + test_sending( sietima => $s, mail => { @@ -17,7 +21,19 @@ test_sending( }, mails => [ object { - call [ header_str => 'from' ] => '"a user" <'.$s->return_path->address.'>'; + call [ header_str => 'from' ] => qq{"a user" <$return_path_address>}; + }, + ], +); + +test_sending( + sietima => $s, + mail => { + from => qq{a user <one\@$return_path_host>}, + }, + mails => [ + object { + call [ header_str => 'from' ] => qq{"a user" <one\@$return_path_host>}; }, ], ); diff --git a/t/tests/sietima/role/nospoof/dmarc.t b/t/tests/sietima/role/nospoof/dmarc.t index ddbd76a..620268b 100644 --- a/t/tests/sietima/role/nospoof/dmarc.t +++ b/t/tests/sietima/role/nospoof/dmarc.t @@ -64,4 +64,6 @@ test_rewriting 'foo@sub.q-q-pol.com'; test_no_rewriting 'foo@example.com'; +test_no_rewriting 'foo@' . $s->post_address->host; + done_testing; |