about summary refs log tree commit homepage
DateCommit message (Collapse)
2022-08-21public-inbox 1.9.0 v1.9.0
2022-08-20doc: 1.9 release notes update
Getting close to another release, I think...
2022-08-20www: mbox* drop unneeded {base_url} memoizations
That field is not needed since List-* and Archived-At headers are no longer appended as of commit: 1bf653ad139bf7bb (nntp+www: drop List-* and Archived-At headers, 2020-12-10)
2022-08-20www: use absolute URLs for coderepo URLs
Showing "../../foo.git" looks awkward and isn't conducive to users who want to "git clone" a URL.
2022-08-20view: do not show pagination footer for small inboxes
For new public inboxes with few messages, the dead pagination footer is a worthless and confusing waste of space: "page: \n"; without `next' or `prev' links for users to follow.
2022-08-20imap: remove some intermediate arrays
We can assign arrays directly without `[]' creating an extra immortal pad allocation.
2022-08-20import: take advantage of some Perl 5.10.x features
We can save a few lines of code this way and reduce the verbosity of some lines we keep.
2022-08-19lei/store: reindex culls over-indexed messages
I may be the only lei user who has redundantly-indexed messages needing this, though...
2022-08-19smsg: ->populate falls back to old {ds}/{ts} values
This will be useful for re-indexing external messages which were over-indexed in lei/store.
2022-08-19tests: add some basic "lei reindex" tests
This is a bit hard-to-test, but at least we must ensure volatile-metadata is preserved.
2022-08-19lei reindex: account for parallel lei/store users
We need to call eidx_init in each git->cat_async callback since another requestor may've stopped the shard processes.
2022-08-19lei reindex: new command to reindex lei/store
2022-08-18lei/store: reduce work when accessing mail_sync.sqlite3
There's no need to initialize eidx if we already have an open handle for mail_sync.sqlite3
2022-08-18lei inspect: less scary exception for invalid "docid:" inspect
It still says "Exception:", but doesn't pointlessly print out the line number and file of the exception when it's a data/input problem, and not a code problem on our end.
2022-08-18searchidx: fix spelling error in comment
2022-08-16lei: do not wait for sto->done on disconnected EOF
lei-daemon (the top-level daemon process) should not have synchronous waits, and this was causing a deadlock with interrupted commands. There may still be a bug lurking in lei/store despite this fix, though. I originally thought commit fd261b9e65674505 (lei_store_err: use level-trigger for error pipe, 2022-08-15) was sufficient, but at least this change is needed, as well.
2022-08-16pop3: speed up STAT slightly (~1%)
We can calculate the total size of the mailbox while generating the cache, which allows us to iterate the cache again to calculate the size of the mailbox slice. While we're in the area, simplify the loop and avoid needlessly updating the `$beg' variable. This adds a small amount of constant time overhead to DELE, however that is amortized across multiple requests for fairness.
2022-08-15lei_store_err: use level-trigger for error pipe
This fixes deadlocks from errors inside lei/store when multiple errors are spewed.
2022-08-12pop3: fix off-by-one error when handling `EXPIRE 0'
mark_dele already works on the cache offset, so there's no need to make further adjustments to the offset (as we do with POP3 sequence numbers).
2022-08-12pop3: quiet warning for cached active statements
Setting the $if_active parameter of ->prepare_cached to `1' seemed to be the best option many years ago, so it's probably the best option going forward when caching prepared statements. Fixes: cab36ebd00ca72f8 ("pop3: remove untouched rows on QUIT/disconnect")
2022-08-11syscall: add support for riscv64
Tested on gcc92.fsffrance.org from cfarm.
2022-08-11tests: support require_mods 'v2'
This fixes t/v2index-late-dupe.t to be skipped properly on systems without DBD::SQLite
2022-08-11doc: spell out "PROTOCOL" in examples
"PROTO" is probably ambiguous, and we'll use the same terminology as used in curl(1) documentation.
2022-08-11examples: add systemd files for -netd
It's important show that a single systemd service and socket file can replace all other read-only daemons for ease-of-management.
2022-08-11examples: consolidate systemd socket examples
systemd.socket(5) files can actually contain multiple listen sockets, so shave down inode overhead and simplify config file management by consolidating all applicable ports into a single file for each daemon.
2022-08-11doc: drop ancient Apache and WEBrick examples
Having old, unmaintained docs for other HTTP servers is likely harmful at this point. public-inbox-httpd is specifically designed to handle git repos on slow storage and stream giant mbox.gz files fairly to slow clients.
2022-08-11devel/syscall-list: support non-Linux, show sizeof(pid_t)
While I have no intention of using syscall numbers for non-Linux, sizeof(pid_t) was useful for OpenBSD. And maybe Linux can have real competition from other OSes with stable syscall numbers someday.
2022-08-11pop3d: enable native fcntl locks on all *BSDs
...as we've already done for the simpler case of mbox locking in lei. I've just confirmed NetBSD and OpenBSD share the same "struct flock" with FreeBSD, and assume DragonflyBSD is the same. sizeof(pid_t) == 4 in all places I've checked, and it's unlikely we'll need 64-bit pid_t any time soon...
2022-08-11www: inbox: favor "pop3://" over "pop://"
curl only supports "pop3://" and "pop3s://", despite RFC 2384 existing for "pop://". AFAIK, there's no RFCs for "pop3://" and "pop3s://", but please let us know if there are. In any case, real-world cases like curl are more relevant.
2022-08-11doc: add WIP 1.9 release notes
I think "lei reindex" and some doc cleanups will be the last things before 1.9...
2022-08-11www_text: fix #nntp anchor for there's a single NNTP server
We use "Newsgroup" (singular) when there's only one NNTP server address configured.
2022-08-10daemon: rely on $SIG{__WARN__} for error output
warn/carp usage is unavoidable given Perl itself and standard libraries, so just rely on localized $SIG{__WARN__} from 60d262483a4d6ddf (daemon: use per-listener SIG{__WARN__} callbacks, 2022-08-08) for all error reporting. While we're in the area, make some of the error handling more consistent between IMAP/NNTP/POP3.
2022-08-10www_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.
2022-08-10www_text: clarify the password+username is for POP3
NNTP and IMAP can also exist in the same area, so clarify that the username + password is only for POP3
2022-08-10www_text: add #nntp, #pop3, and #imap anchors to help HTML
This will make it easier to link to these sections in 3rd-party documentation.
2022-08-10pop3: remove untouched rows on QUIT/disconnect
Some POP3 clients may connect and never retrieve messages nor trigger deletes. In that case, save some storage by removing unused rows from the `deletes' and `users' tables.
2022-08-09imapd|nntpd: drop ->base_url preload
It was never useful for IMAP, and NNTP hasn't needed it since: 1bf653ad139bf7bb (nntp+www: drop List-* and Archived-At headers, 2020-12-10)
2022-08-09imap: mailboxes list across listeners
Since IMAP mailbox lists are tied to the PublicInbox::Config object, we can share them the same way the config object is shared when an -imapd or -netd instance has multiple listeners. This ought to reduce memory use and startup time when binding multiple sockets which share a common config file.
2022-08-09daemon: cleanup internal data structures
This avoids dangling {''} entries in $xnetd and %tls_opt hashes. Furthermore, we can safely undef %tls_opt once it's associated with each $xnetd object.
2022-08-09daemon: use per-listener SIG{__WARN__} callbacks
This allows "-l $ADDRESS?err=/path/to/err.log to isolate normal warn() (and carp()) messages for a particular listen address to track down errors more easily.
2022-08-09daemon: use default address + well-known ports for scheme
This ensures the "bound $URL" diagnostic message at startup always shows the URL scheme handled if not relying on socket inheritance. This also avoids duplicate/unused data structures when binding sockets ourselves, as bound socket names can expand from short names to longer names (e.g. "0:119" => "0.0.0.0:119").
2022-08-09README: recommend AUTH=ANONYMOUS on IMAP URLs
public-inbox-imapd prioritizes AUTH=ANONYMOUS clients, nowadays, since it's a good heuristic for legitimate client traffic.
2022-08-09imap: prioritize AUTH=ANONYMOUS clients
...by deprioritizing clients using a username + password. As IMAP provides AUTH=ANONYMOUS for designating anonymous access, we'll rely on it as a heuristic for favoring "good" clients. Clients using a username + password seem to (more often than not) be malicious and looking for info which doesn't belong in public inboxes. This copies the technique used by WWW + -httpd to deprioritize expensive mbox.gz downloads.
2022-08-09imap: only give AUTH=ANONYMOUS clients prefetch
Looking at IMAP traffic on public-inbox.org, it seems there is a fair amount of traffic coming from malicious clients assuming the IMAP server is compromised and searching for private information. Since AUTH=ANONYMOUS clients are more likely to be legitimate clients looking for publicly-archived mail, give them priority.
2022-08-09imap: limit ibx_async_prefetch to idle git processes
This improves fairness while having no measurable performance impact for a single uncached IMAP client (mutt) opening a folder for the first time. I noticed this problem with the public-inbox.org IMAP server where a few IMAP clients were unfairly monopolizing the -netd process.
2022-08-06daemon: dedupe PublicInbox::Config objects by pathname
This means all Inbox, Git, Over, Msgmap, Search objects also get deduplicated if they belong to the same config file, reducing memory and FD usage. This helps save memory and improve cache hit rates in -netd setups where NNTP, IMAP, HTTP, and POP3 servers run in the same process. InboxIdle was the only bit which needed adjustment, but there may be other bugs lurking despite all tests passing.
2022-08-04www: gzip_filter: avoid errors after ->write failure
->zflush must return a string to its caller, not undef. Additionally, {http_out} may be deleted on ->write if ->close recurses. This should fix the following errors: Use of uninitialized value $_[1] in string eq at PublicInbox/HTTP.pm line 211. E: Can't call method "close" on an undefined value at GzipFilter.pm line 167. Fixes: a6d50dc1098c01a1 (www: gzip_filter: gracefully handle socket ->write failures, 2022-08-03)
2022-08-04view: avoid intermediate array when streaming thread
We can rely on auto-vivification to avoid an intermediate array for the map result.
2022-08-04feed: avoid unnecessary map loop in non-over path
We can bless objects while doing the initial insertion to avoid extra the extra map iteration and temporary array(s). Fewer ops means memory savings for the likely case of ->over users, too.
2022-08-04imap: ensure_slices_exist: drop needless map and array
We can reduce ops and temporary objects here by folding the stringification into the `for' loop and push directly into the {mailboxlist} array; relying on autovivification to turn it into a noop for the initial population.