openwall / blists Goto Github PK
View Code? Open in Web Editor NEWWeb interface to mailing list archives
Home Page: https://www.openwall.com/blists/
License: Other
Web interface to mailing list archives
Home Page: https://www.openwall.com/blists/
License: Other
blists is a web-based interface to mailing list archives that works off indexed mbox files. There are two programs: bindex and bit. bindex generates or updates the index file (yes, incremental updates are supported). bit is a CGI program, which generates web pages on the fly. blists homepage: http://www.openwall.com/blists/ Live example with a high volume mailing list: http://lists.openwall.net/linux-kernel/ To compile, simply run "make". There's currently no "install" target; you're supposed to copy the bindex and bit programs in place on your own, as appropriate for your setup. Also you may need to setup for your httpd: cgi, SSI (shtml), and mod_rewrite. You will likely want to have bindex run after new messages arrive. For example, you may invoke it from a .procmailrc file like this: :0 * ^TOlistname { :0 c Mail/listname :0 | /usr/bin/bindex Mail/listname } This delivers new messages to an mbox file called "listname" and it immediately triggers update of the index file for it. You can also accomplish this from .forward and .qmail files. Alternatively, you may choose to run bindex on cron. The index file name is produced by adding the .idx suffix to the mbox filename, so in this example it will be "listname.idx" in the same directory. With the default params.h settings, the index file size is typically 100 KB plus around 3.5% of the mbox file's size. bit is meant to be invoked via SSI (it will refuse to work otherwise), and it has only been tested with Apache so far. Here's an example SSI-enabled HTML file (usually with extension .shtml): <!DOCTYPE html> <html> <head> <!--#include virtual="/cgi-bin/bit?header"--> <style type="text/css"> .cal_brief { text-align: center; } .cal_brief td:first-child { background: inherit; } .cal_brief td { background: #ccc; width: 5ex; padding: 2px; } .cal_big { text-align: center; padding: 0; margin: 0; } .cal_big td { padding: 0 2px; } .cal_mon { text-align: center; } .cal_mon th { font-size: small; padding: 0; margin: 0; } .cal_mon td { background: #ccc; width: 5ex; height: 1.5em; padding: 2px; text-align: right; } .cal_mon td[colspan] { background: inherit; } .cal_mon sup { color: #F0F0F0; text-align: left; float: left; margin-top: -2pt; font-weight: bold; } .cal_mon a { text-align: right; margin-left: -4em; float: right; } </style> </head> <body> <!--#include virtual="/cgi-bin/bit?body"--> </body> </html> bit output it in UTF-8, so you will need to configure charset, for Apache add this (for example to to .htaccess in the directory where bit.shtml is): AddCharset UTF-8 .shtml Obviously, you'll also need to adjust the /cgi-bin/bit paths, and you might need to add a filename suffix to match your web server configuration (for example it could be bit.cgi). You may need to configure MAIL_SPOOL_PATH definition in params.h to tell bit where mboxes are located, otherwise bit will assume they are in ../../blists/ relative to cgi-bin directory (where bit is). In order for the links generated by bit to point to valid URLs, as well as for the URLs to look pretty, you may use mod_rewrite rules like this: RewriteEngine On RewriteRule ^((listname1|listname2)/([0-9]{4}/([0-9]{2}/([0-9]{2}/([1-9][0-9]*)?)?)?)?)$ list.shtml?$1 [L] RewriteRule ^((listname1|listname2)/[0-9]{4}/[0-9]{2}/[0-9]{2}/[1-9][0-9]*/[1-9][0-9]*)$ /cgi-bin/bit?attachment+$1 [L] Direct call to bit is required to set HTTP headers for attachments. To workaround a bug in Lynx where it would omit the trailing slash when following links to "..", add: RewriteRule ^[a-z-]+([/0-9]*[0-9])?$ http://%{SERVER_NAME}%{REQUEST_URI}/ [R,L] (where "[a-z-]+" is supposed to match your list names; adjust it if not). To have separate HTML wrapper pages for different lists (such as to include different additional info on those pages), use: RewriteRule ^(listname1|listname2)/(([0-9]{4}/([0-9]{2}/([0-9]{2}/([1-9][0-9]*)?)?)?)?)$ list-$1.shtml?$1/$2 [L] To make use of the censorship feature (to hide spam messages), create a separate HTML wrapper page with: <!--#include virtual="/cgi-bin/bit?header-censored"--> ... <!--#include virtual="/cgi-bin/bit?body-censored"--> then refer to it in more specific RewriteRule directives, which you need to place above the catch-all ones: RewriteRule ^(listname1/2011/01/02/3)$ list-censor.shtml?$1 [L] You may match multiple messages at once with trickier regexps: RewriteRule ^(listname1/2011/01/(09/1|12/1|12/2))$ list-censor.shtml?$1 [L] Good luck!
blists
does check for errors from malloc
and realloc
, but it does so in its lower-level wrappers such as buffer_grow
, msgs_grow
, and concat
. The higher-level and /indirect callers of those do not always check whether an error occurred (example: uses of concat
in html_error_real
) or when they do they might not make it clear to the sysadmin what the issue really is (example: msgs_grow
failure in begin_inc_idx
will result in non-incremental index update with no reason given as to why, which is especially unexpected to a sysadmin given that the underlying realloc
can sometimes momentarily need almost 2x more memory than the requested new size).
We should review these cases and introduce reasonable error reporting.
We have some http
URLs generated by html.c
, included in README
(one of them in a configuration example), and in comments in md5.[ch]
. It's high time we change them to https
.
We should include the Message-ID header alongside the currently displayed Date/From/To/Subject headers... or maybe below the message body? Either way, this is a bit tricky since we're obfuscating anything that looks like an e-mail address, and Message-ID strings do look like that, so we'll probably need a bypass of the obfuscation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.