about summary refs log tree commit homepage
path: root/public-inbox-nntpd
DateCommit message (Collapse)
2016-02-23initial public-inbox-httpd implemenation
This is meant to provide an easy starting point for server admins. It provides a basic HTTP server for admins unfamiliar with configuring PSGI applications as well as being an identical interface for management as our nntpd implementation. This HTTP server may also be a generic Plack/PSGI server for existing Plack/PSGI applications.
2016-01-04listener: pass accepted address to post_accept
We can avoid making getpeername syscalls this way.
2015-11-20various internal documentation updates
Hopefully this gives new hackers a better overview of how the components relate to each other.
2015-10-02nntpd: executable permission
Ensure we are executable for consistency and documentation. MakeMaker already makes this executable, but we might as well do the same...
2015-09-30nntp: implement OVER/XOVER summary in search document
The document data of a search message already contains a good chunk of the information needed to respond to OVER/XOVER commands quickly. Expand on that and use the document data to implement OVER/XOVER quickly. This adds a dependency on Xapian being available for nntpd usage, but is probably alright since nntpd is esoteric enough that anybody willing to run nntpd will also want search functionality offered by Xapian. This also speeds up XHDR/HDR with the To: and Cc: headers and :bytes/:lines article metadata used by some clients for header displays and marking messages as read/unread.
2015-09-30nntpd: avoid lazy require
We cannot avoid requiring ::Config, so do not hide it.
2015-09-30remove unnecessary fields usage
It doesn't actually give performance improvements unless we use types with "my", but we don't do that. We'll only continue using fields with Danga::Socket-derived classes where they're required.
2015-09-24nntpd: hoist out daemon management code
We'll probably be supporting read-only IMAP, or maybe we'll just implement a custom HTTP server so users can manage/upgrade the same way as the nntpd while being immune to slow clients.
2015-09-24nntpd: support SIGUSR2 in single-process mode, too
We may support SIGUSR2 in single-process mode as long as permissions aren't wonky.
2015-09-24nntpd: better encapsulation for shutdown
We can use the UNIVERSAL::can to better encapsulate the shutdown process, in case we need to implement a gopher or HTTP daemon.
2015-09-24nntpd: move busy check to NNTP package
This is better encapsulated and hopefully more readable. While we're at it, check for being inside a long response, too.
2015-09-24nntpd: hard quit after 30s
We don't want clients hogging server resources and preventing us from shutting down, so give them 30s to finish whatever request they're getting.
2015-09-24nntpd: additional daemonization options
This should fully support the signals used by nginx and starman, so scripts used by nginx can be used to manage our nntpd daemon, too.
2015-09-21remove bytes:: for length checks
Apparently, my mental model of Perl internals is still incorrect after all these years. I am but a simple *nix programmer: everything is a bag of bytes to me. This fixes a problem with UTF-8 headers from Xapian (via "XHDR Subject [range]") triggering partial writes and writing an extra newline to the outputs.
2015-09-20nntp: add "newsgroup" parameter and sort grouplist
Using non-hierarchical mailing list names for newsgroups might confuse traditional newsreader software and perhaps some humans. Allow administrators to configure newsgroups names and hierarchies to their liking. Sorting the grouplist alphabetically should probably be done anyways to improve usability for some clients which won't sort themselves.
2015-09-20nntp: fix handling of trickled responses
We cannot use the push_back_read functionality of Danga::Socket since it will trigger event_read on buffered data. This would allow a malicious (or badly implemented) client to burn CPU without actually sending us anything. So we still do buffering ourselves and play some tricks with timers re-enable readability.
2015-09-20nntpd: support systemd FD inheritance + signals
Avoid depending on IO::Socket::INET if we can help it, we do not need to bloat ourselves with lot of that functionality.
2015-09-19nntp: log to FDs given by the Nntpd module
This will allow us to redirect stdout/stderr more easily for logging.
2015-09-18read-only NNTP server
Implementing NEWNEWS, XHDR, XOVER efficiently will require additional caching on top of msgmap. This seems to work with lynx and slrnpull, haven't tried clients. DO NOT run in production, yet, denial-of-service vulnerabilities await!