]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/pop3d: add diagnostics on APOP after STLS failure
authorEric Wong <e@80x24.org>
Wed, 22 Oct 2025 19:36:13 +0000 (19:36 +0000)
committerEric Wong <e@80x24.org>
Fri, 24 Oct 2025 08:15:18 +0000 (08:15 +0000)
Calling `APOP' after `STLS' to start TLS seems to fail
occasionally, but I haven't been able to figure out why.
Add some diagnostics to hopefully explain what's going
on...

t/pop3d.t

index ee19f2d765c1ce916b7f16797e08809fedbeb615..10eac41c49609839fff3b8d58f960c0c7e97a184 100644 (file)
--- a/t/pop3d.t
+++ b/t/pop3d.t
@@ -249,8 +249,10 @@ EOF
 
                $np3 = Net::POP3->new(@np3_args, %o);
                ok($np3->starttls, 'STLS works before APOP');
-               ok($np3->apop($u, 'anonymous'), "APOP UUID\@$mailbox w/ STLS");
-
+               my $nr = $np3->apop($u, 'anonymous');
+               ok $nr, "APOP UUID\@$mailbox w/ STLS" or
+                       diag(explain({nr => $nr, pop3 => \%{*$np3}},
+                               errno => "$!"));
                # undocumented:
                ok($np3->_NOOP, 'NOOP works') if $np3->can('_NOOP');
        }