* [ANNOUNCE] public-inbox 1.3.0
@ 2020-02-10 5:52 4% Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2020-02-10 5:52 UTC (permalink / raw)
To: meta
Many internal improvements to improve the developer experience,
long-term maintainability, ease-of-installation and compatibility.
There are also several bugfixes.
Some of the internal improvements involve avoiding Perl startup
time in tests. "make check" now runs about 50% faster than
before, and the new "make check-run" can be around 30% faster
than "make check" after being primed by "make check".
Most closures (anonymous subroutines) are purged from the
-nntpd, -httpd and WWW code paths to make checking for memory
leaks easier.
* documentation now builds on BSD make
* Date::Parse (TimeDate CPAN distribution) is now optional, allowing
installation from OpenBSD systems via "pkg".
* the work-in-progress Xapian.pm SWIG bindings are now supported
in addition to the traditional Search::Xapian XS bindings.
Only the SWIG bindings are packaged for OpenBSD.
* Plack is optional for users who wish to avoid web-related components
* Filesys::Notify::Simple is optional for non-watch users
(but Plack will still pull it in)
* improved internal error checking and reporting in numerous places
* fixed Perl 5.10.1 compatibility (tested with Devel::PatchPerl)
* IPC::Run and XML::Feed are no longer used in tests,
though XML::TreePP becomes an optional test dependency.
* Email::Address::XS used if available (newer Email::MIME
requires it), it should handle more corner cases.
* PublicInbox::WWW:
- "nested" search results page now shows relevancy percentages
- many solver bugs fixed
- solver works on "-U0" patches using "git apply --unidiff-zero"
- solver now compatible with git < v1.8.5 (but >= v1.8.0)
- raw HTML no longer shown inline in multipart/alternative messages
(v1.2.0 regression)
- reduced memory usage for displaying multipart messages
- static file responses support Last-Modified/If-Modified-Since
- avoid trailing underlines in diffstat linkification
- more consistent handling of messages without Subjects
* public-inbox-httpd / public-inbox-nntpd:
- MSG_MORE used consistently in long responses
- fixed IO::KQueue usage on *BSDs
- listen sockets are closed immediately on graceful shutdown
- missed signals avoided with signalfd or EVFILT_SIGNAL
- Linux x32 ABI support
* public-inbox-nntpd:
- Y2020 workaround for Time::Local
* public-inbox-watch:
- avoid memory leak from cyclic reference on SIGHUP
- fix documentation of publicinboxwatch.watchspam
* public-inbox-convert:
- avoid article number jumps when converting indexed v1 inboxes
* public-inbox-compact / public-inbox-xcpdb:
- concurrent invocations of -compact and -xcpdb commands,
not just -mda, -watch, -learn, -purge
* examples/unsubscribe.milter:
- support unique mailto: unsubscribe
Release tarball available for download at:
https://public-inbox.org/public-inbox.git/snapshot/public-inbox-1.3.0.tar.gz
Please report bugs via plain-text mail to: meta@public-inbox.org
See archives at https://public-inbox.org/meta/ for all history.
See https://public-inbox.org/TODO for what the future holds.
^ permalink raw reply [relevance 4%]
* [PATCH 0/2] examples/unsubscribe.milter updates
@ 2020-01-10 22:55 7% Eric Wong
2020-01-10 22:55 5% ` [PATCH 2/2] examples/unsubscribe.milter: support unique mailto: Eric Wong
0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2020-01-10 22:55 UTC (permalink / raw)
To: meta
It's been a while since I've done anything with this, but
gmane is getting a new domain and I encountered a user
whose MUA favored mailto: in List-Unsubscribe rather than
https://
Eric Wong (2):
examples/unsubscribe.milter: skip gmane-mx
examples/unsubscribe.milter: support unique mailto:
examples/unsubscribe-milter@.service | 6 +++++
examples/unsubscribe.milter | 37 +++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 1 deletion(-)
^ permalink raw reply [relevance 7%]
* [PATCH 2/2] examples/unsubscribe.milter: support unique mailto:
2020-01-10 22:55 7% [PATCH 0/2] examples/unsubscribe.milter updates Eric Wong
@ 2020-01-10 22:55 5% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2020-01-10 22:55 UTC (permalink / raw)
To: meta
Instead of providing a generic "mailto:foo+unsubscribe@example.com"
address in List-Unsubscribe which requires confirmation, replace it
with a mailto: header with a unique subject which contains the same
unique ID we put in the https:// URL.
This makes it easier for some MUAs without https:// support to
unsubscribe with a single action via the List-Unsubscribe header.
---
examples/unsubscribe-milter@.service | 6 +++++
examples/unsubscribe.milter | 35 ++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/examples/unsubscribe-milter@.service b/examples/unsubscribe-milter@.service
index 98e3d478..eb5dcbe4 100644
--- a/examples/unsubscribe-milter@.service
+++ b/examples/unsubscribe-milter@.service
@@ -14,6 +14,12 @@ After = unsubscribe-milter.socket
# copy+paste errors
# umask 077 && dd if=/dev/urandom bs=16 count=1 of=.unsubscribe.key
ExecStart = /usr/local/sbin/unsubscribe.milter /home/mlmmj/.unsubscribe.key
+
+# UNIQUE_MAILTO makes the List-Unsubscribe mailto: header unique
+# so unsubcribing becomes one-step (requires MDA/MTA configuration,
+# see the bottom of examples/unsubscribe.milter
+# Environment = UNIQUE_MAILTO=1
+
Sockets = unsubscribe-milter.socket
# the corresponding PSGI app needs permissions to modify the
diff --git a/examples/unsubscribe.milter b/examples/unsubscribe.milter
index f7bf6f1d..266596fa 100644
--- a/examples/unsubscribe.milter
+++ b/examples/unsubscribe.milter
@@ -16,6 +16,10 @@ if (read($fh, $key, 8) != 8 || read($fh, $iv, 8) != 8 ||
die "KEY_FILE must be 16 bytes\n";
}
+# optionally support unique mailto: subject in List-Unsubscribe,
+# requires a custom rule in front of mlmmj, see __END__
+my $unique_mailto = $ENV{UNIQUE_MAILTO};
+
# these parameters were chosen to generate shorter parameters
# to reduce the possibility of copy+paste errors
my $crypt = Crypt::CBC->new(-key => $key,
@@ -102,6 +106,12 @@ $cbs{eom} = sub {
next unless $k && $v && $list && $domain;
my $u = $crypt->encrypt($rcpt[0]);
$u = encode_base64url($u);
+ if ($unique_mailto) {
+ # $u needs to be in the Subject: header since
+ # +$EXTENSION is case-insensitive
+ my $s = "subject=$u";
+ $v = "<mailto:$list+unique-unsub\@$domain?$s>";
+ }
$v .= ",\n <https://$domain/u/$u/$list>";
$ctx->chgheader($k, $index, $v);
@@ -132,3 +142,28 @@ if ($fds && (($ENV{LISTEN_PID} || 0) == $$)) {
$milter->register('unsubscribe', \%cbs, SMFI_CURR_ACTS);
$milter->main();
+__END__
+# TMPMSG comes from dc-dlvr, it's populated before the above runs:
+# TMPMSG=$(mktemp -t dc-dlvr.orig.$USER.XXXXXX || exit 1)
+# cat >$TMPMSG
+
+# I use something like this in front of mlmmj for UNIQUE_MAILTO
+# $EXTENSION and $ORIGINAL_RECIPIENT are set by postfix, $list
+# is a local mapping of addresses to mailing list names.
+case $ORIGINAL_RECIPIENT in
+foo+*) list=foo ;;
+# ...
+esac
+
+case $EXTENSION in
+unique-unsub)
+ u="$(formail -z -c -x Subject <$TMPMSG)"
+ d=$(expr "$ORIGINAL_RECIPIENT" : '^.*@\(.*\)')
+
+ # forward this to the unsubscribe.psgi service
+ curl -sSf https://$d/u/$u/$list >/dev/null
+ exit
+ ;;
+esac
+/usr/bin/mlmmj-receive -L /path/to/mlmmj-spool/$list <"$TMPMSG"
+exit
^ permalink raw reply related [relevance 5%]
Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-01-10 22:55 7% [PATCH 0/2] examples/unsubscribe.milter updates Eric Wong
2020-01-10 22:55 5% ` [PATCH 2/2] examples/unsubscribe.milter: support unique mailto: Eric Wong
2020-02-10 5:52 4% [ANNOUNCE] public-inbox 1.3.0 Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).