diff options
author | Eric Wong <e@80x24.org> | 2021-09-16 00:26:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-16 04:29:12 +0000 |
commit | 3690f0625fbfb75dcc73986d78abba738e9113a4 (patch) | |
tree | a14a9b4aca80b9b168bf8bfbeb49dd624b45ce64 /lib/PublicInbox/WwwText.pm | |
parent | b4bc9aeed78078feae58d150970fe224f10098e3 (diff) | |
download | public-inbox-3690f0625fbfb75dcc73986d78abba738e9113a4.tar.gz |
This allows PublicInbox::WWW hosts to advertise the existence of IMAP servers in addition to NNTP servers.
Diffstat (limited to 'lib/PublicInbox/WwwText.pm')
-rw-r--r-- | lib/PublicInbox/WwwText.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index 177d55e4..bb9a0a0f 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -211,6 +211,7 @@ EOF $$txt .= "\t$k = $v\n"; } $$txt .= "\tnntpmirror = $_\n" for (@{$ibx->nntp_url($ctx)}); + $$txt .= "\timapmirror = $_\n" for (@{$ibx->imap_url($ctx)}); _coderepo_config($ctx, $txt); 1; } @@ -342,6 +343,17 @@ EOM Example config snippet for mirrors: $cfg_link EOF + if ($ibx->can('imap_url')) { + my $imap = $ibx->imap_url($ctx); + if (@$imap) { + $$txt .= "\n"; + $$txt .= 'IMAP subfolder(s) available under:'; + $$txt .= "\n\t" . join("\n\t", @$imap) . "\n"; + $$txt .= <<EOM + # each subfolder (starting with `0') holds 50K messages at most +EOM + } + } if ($ibx->can('nntp_url')) { my $nntp = $ibx->nntp_url($ctx); if (scalar @$nntp) { |