From 1c457e08d2bb3352bdddde0a3580ff37f317cc72 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Aug 2022 07:40:31 +0000 Subject: www_text: add AUTH=ANONYMOUS to IMAP URLs While the ';' requires escaping on the command-line, the presence of ";AUTH=ANONYMOUS" communicates clearly that anonymous access is supported in accordance to RFC 4505. --- lib/PublicInbox/WwwText.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/WwwText.pm') diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index 71b04561..c067369e 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -276,10 +276,12 @@ sub _add_non_http_urls ($$) { $ctx->{ibx}->can('nntp_url') or return; # TODO extindex can have IMAP my $urls = $ctx->{ibx}->imap_url($ctx); if (@$urls) { - $$txt .= "\nIMAP subfolder(s) are available under:"; - $$txt .= "\n " . join("\n ", @$urls); + $urls = join("\n ", @$urls); + $urls =~ s!://([^/@]+)/!://;AUTH=ANONYMOUS\@$1/!sg; $$txt .= <