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(-)
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 .= <<EOM
+IMAP subfolder(s) are available under:
+ $urls
# each subfolder (starting with `0') holds 50K messages at most
EOM
}