+ ($buf);
+}
+
+sub _add_non_http_urls ($$) {
+ my ($ctx, $txt) = @_;
+ $ctx->{ibx}->can('nntp_url') or return; # TODO extindex can have IMAP
+ my $urls = $ctx->{ibx}->imap_url($ctx);
+ if (@$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
+ }
+ $urls = $ctx->{ibx}->nntp_url($ctx);
+ if (@$urls) {
+ $$txt .= @$urls == 1 ? "\nNewsgroup" : "\nNewsgroups are";
+ $$txt .= ' available over NNTP:';
+ $$txt .= "\n " . join("\n ", @$urls) . "\n";
+ }
+ $urls = $ctx->{ibx}->pop3_url($ctx);
+ if (@$urls) {
+ $urls = join("\n ", @$urls);
+ $$txt .= <<EOM;
+
+POP3 access is available:
+ $urls
+
+The POP3 password is: anonymous
+The POP3 username is: \$(uuidgen)\@$ctx->{ibx}->{newsgroup}
+where \$(uuidgen) in the output of the `uuidgen' command on your system.
+The UUID in the username functions as a private cookie (don't share it).
+Idle accounts will expire periodically.
+EOM
+ }
+}
+
+sub _add_onion_note ($) {
+ my ($txt) = @_;
+ $$txt =~ m!\b[^:]+://\w+\.onion/!i and $$txt .= <<EOM
+
+note: .onion URLs require Tor: https://www.torproject.org/
+
+EOM