]> Sergey Matveev's repositories - public-inbox.git/blob - lib/PublicInbox/Import.pm
import: rewrite less history during purge
[public-inbox.git] / lib / PublicInbox / Import.pm
1 # Copyright (C) 2016-2018 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 #
4 # git fast-import-based ssoma-mda MDA replacement
5 # This is only ever run by public-inbox-mda and public-inbox-learn,
6 # not the WWW or NNTP code which only requires read-only access.
7 package PublicInbox::Import;
8 use strict;
9 use warnings;
10 use base qw(PublicInbox::Lock);
11 use PublicInbox::Spawn qw(spawn);
12 use PublicInbox::MID qw(mids mid_mime mid2path);
13 use PublicInbox::Address;
14 use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
15 use PublicInbox::ContentId qw(content_digest);
16 use PublicInbox::MDA;
17
18 sub new {
19         my ($class, $git, $name, $email, $ibx) = @_;
20         my $ref = 'refs/heads/master';
21         if ($ibx) {
22                 $ref = $ibx->{ref_head} || 'refs/heads/master';
23                 $name ||= $ibx->{name};
24                 $email ||= $ibx->{-primary_address};
25         }
26         bless {
27                 git => $git,
28                 ident => "$name <$email>",
29                 mark => 1,
30                 ref => $ref,
31                 inbox => $ibx,
32                 path_type => '2/38', # or 'v2'
33                 lock_path => "$git->{git_dir}/ssoma.lock", # v2 changes this
34                 bytes_added => 0,
35         }, $class
36 }
37
38 # idempotent start function
39 sub gfi_start {
40         my ($self) = @_;
41
42         return ($self->{in}, $self->{out}) if $self->{pid};
43
44         my ($in_r, $in_w, $out_r, $out_w);
45         pipe($in_r, $in_w) or die "pipe failed: $!";
46         pipe($out_r, $out_w) or die "pipe failed: $!";
47         my $git = $self->{git};
48
49         $self->lock_acquire;
50
51         local $/ = "\n";
52         my $ref = $self->{ref};
53         chomp($self->{tip} = $git->qx(qw(rev-parse --revs-only), $ref));
54         if ($self->{path_type} ne '2/38' && $self->{tip}) {
55                 local $/ = "\0";
56                 my @tree = $git->qx(qw(ls-tree -r -z --name-only), $ref);
57                 chomp @tree;
58                 $self->{-tree} = { map { $_ => 1 } @tree };
59         }
60
61         my $git_dir = $git->{git_dir};
62         my @cmd = ('git', "--git-dir=$git_dir", qw(fast-import
63                         --quiet --done --date-format=raw));
64         my $rdr = { 0 => fileno($out_r), 1 => fileno($in_w) };
65         my $pid = spawn(\@cmd, undef, $rdr);
66         die "spawn fast-import failed: $!" unless defined $pid;
67         $out_w->autoflush(1);
68         $self->{in} = $in_r;
69         $self->{out} = $out_w;
70         $self->{pid} = $pid;
71         $self->{nchg} = 0;
72         binmode $out_w, ':raw' or die "binmode :raw failed: $!";
73         binmode $in_r, ':raw' or die "binmode :raw failed: $!";
74         ($in_r, $out_w);
75 }
76
77 sub wfail () { die "write to fast-import failed: $!" }
78
79 sub now_raw () { time . ' +0000' }
80
81 sub norm_body ($) {
82         my ($mime) = @_;
83         my $b = $mime->body_raw;
84         $b =~ s/(\r?\n)+\z//s;
85         $b
86 }
87
88 # only used for v1 (ssoma) inboxes
89 sub _check_path ($$$$) {
90         my ($r, $w, $tip, $path) = @_;
91         return if $tip eq '';
92         print $w "ls $tip $path\n" or wfail;
93         local $/ = "\n";
94         defined(my $info = <$r>) or die "EOF from fast-import: $!";
95         $info =~ /\Amissing / ? undef : $info;
96 }
97
98 sub check_remove_v1 {
99         my ($r, $w, $tip, $path, $mime) = @_;
100
101         my $info = _check_path($r, $w, $tip, $path) or return ('MISSING',undef);
102         $info =~ m!\A100644 blob ([a-f0-9]{40})\t!s or die "not blob: $info";
103         my $blob = $1;
104
105         print $w "cat-blob $blob\n" or wfail;
106         local $/ = "\n";
107         $info = <$r>;
108         defined $info or die "EOF from fast-import / cat-blob: $!";
109         $info =~ /\A[a-f0-9]{40} blob (\d+)\n\z/ or
110                                 die "unexpected cat-blob response: $info";
111         my $left = $1;
112         my $offset = 0;
113         my $buf = '';
114         my $n;
115         while ($left > 0) {
116                 $n = read($r, $buf, $left, $offset);
117                 defined($n) or die "read cat-blob failed: $!";
118                 $n == 0 and die 'fast-export (cat-blob) died';
119                 $left -= $n;
120                 $offset += $n;
121         }
122         $n = read($r, my $lf, 1);
123         defined($n) or die "read final byte of cat-blob failed: $!";
124         die "bad read on final byte: <$lf>" if $lf ne "\n";
125         my $cur = PublicInbox::MIME->new(\$buf);
126         my $cur_s = $cur->header('Subject');
127         $cur_s = '' unless defined $cur_s;
128         my $cur_m = $mime->header('Subject');
129         $cur_m = '' unless defined $cur_m;
130         if ($cur_s ne $cur_m || norm_body($cur) ne norm_body($mime)) {
131                 return ('MISMATCH', $cur);
132         }
133         (undef, $cur);
134 }
135
136 sub checkpoint {
137         my ($self) = @_;
138         return unless $self->{pid};
139         print { $self->{out} } "checkpoint\n" or wfail;
140         undef;
141 }
142
143 sub progress {
144         my ($self, $msg) = @_;
145         return unless $self->{pid};
146         print { $self->{out} } "progress $msg\n" or wfail;
147         $self->{in}->getline eq "progress $msg\n" or die
148                 "progress $msg not received\n";
149         undef;
150 }
151
152 sub _update_git_info ($$) {
153         my ($self, $do_gc) = @_;
154         # for compatibility with existing ssoma installations
155         # we can probably remove this entirely by 2020
156         my $git_dir = $self->{git}->{git_dir};
157         my @cmd = ('git', "--git-dir=$git_dir");
158         my $index = "$git_dir/ssoma.index";
159         if (-e $index && !$ENV{FAST}) {
160                 my $env = { GIT_INDEX_FILE => $index };
161                 run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env);
162         }
163         run_die([@cmd, 'update-server-info'], undef);
164         ($self->{path_type} eq '2/38') and eval {
165                 require PublicInbox::SearchIdx;
166                 my $inbox = $self->{inbox} || $git_dir;
167                 my $s = PublicInbox::SearchIdx->new($inbox);
168                 $s->index_sync({ ref => $self->{ref} });
169         };
170         eval { run_die([@cmd, qw(gc --auto)], undef) } if $do_gc;
171 }
172
173 sub barrier {
174         my ($self) = @_;
175
176         # For safety, we ensure git checkpoint is complete before because
177         # the data in git is still more important than what is in Xapian
178         # in v2.  Performance may be gained by delaying the ->progress
179         # call but we lose safety
180         if ($self->{nchg}) {
181                 $self->checkpoint;
182                 $self->progress('checkpoint');
183                 _update_git_info($self, 0);
184                 $self->{nchg} = 0;
185         }
186 }
187
188 # used for v2
189 sub get_mark {
190         my ($self, $mark) = @_;
191         die "not active\n" unless $self->{pid};
192         my ($r, $w) = $self->gfi_start;
193         print $w "get-mark $mark\n" or wfail;
194         defined(my $oid = <$r>) or die "get-mark failed, need git 2.6.0+\n";
195         $oid;
196 }
197
198 # returns undef on non-existent
199 # ('MISMATCH', Email::MIME) on mismatch
200 # (:MARK, Email::MIME) on success
201 #
202 # v2 callers should check with Xapian before calling this as
203 # it is not idempotent.
204 sub remove {
205         my ($self, $mime, $msg) = @_; # mime = Email::MIME
206
207         my $path_type = $self->{path_type};
208         my ($path, $err, $cur, $blob);
209
210         my ($r, $w) = $self->gfi_start;
211         my $tip = $self->{tip};
212         if ($path_type eq '2/38') {
213                 $path = mid2path(v1_mid0($mime));
214                 ($err, $cur) = check_remove_v1($r, $w, $tip, $path, $mime);
215                 return ($err, $cur) if $err;
216         } else {
217                 my $sref;
218                 if (ref($mime) eq 'SCALAR') { # optimization used by V2Writable
219                         $sref = $mime;
220                 } else { # XXX should not be necessary:
221                         my $str = $mime->as_string;
222                         $sref = \$str;
223                 }
224                 my $len = length($$sref);
225                 $blob = $self->{mark}++;
226                 print $w "blob\nmark :$blob\ndata $len\n",
227                         $$sref, "\n" or wfail;
228         }
229
230         my $ref = $self->{ref};
231         my $commit = $self->{mark}++;
232         my $parent = $tip =~ /\A:/ ? $tip : undef;
233         unless ($parent) {
234                 print $w "reset $ref\n" or wfail;
235         }
236         my $ident = $self->{ident};
237         my $now = now_raw();
238         $msg ||= 'rm';
239         my $len = length($msg) + 1;
240         print $w "commit $ref\nmark :$commit\n",
241                 "author $ident $now\n",
242                 "committer $ident $now\n",
243                 "data $len\n$msg\n\n",
244                 'from ', ($parent ? $parent : $tip), "\n" or wfail;
245         if (defined $path) {
246                 print $w "D $path\n\n" or wfail;
247         } else {
248                 clean_tree_v2($self, $w, 'd');
249                 print $w "M 100644 :$blob d\n\n" or wfail;
250         }
251         $self->{nchg}++;
252         (($self->{tip} = ":$commit"), $cur);
253 }
254
255 sub git_timestamp {
256         my ($ts, $zone) = @_;
257         $ts = 0 if $ts < 0; # git uses unsigned times
258         "$ts $zone";
259 }
260
261 sub extract_author_info ($) {
262         my ($mime) = @_;
263
264         my $sender = '';
265         my $from = $mime->header('From');
266         my ($email) = PublicInbox::Address::emails($from);
267         my ($name) = PublicInbox::Address::names($from);
268         if (!defined($name) || !defined($email)) {
269                 $sender = $mime->header('Sender');
270                 if (!defined($name)) {
271                         ($name) = PublicInbox::Address::names($sender);
272                 }
273                 if (!defined($email)) {
274                         ($email) = PublicInbox::Address::emails($sender);
275                 }
276         }
277         if (defined $email) {
278                 # quiet down wide character warnings with utf8::encode
279                 utf8::encode($email);
280         } else {
281                 $email = '';
282                 warn "no email in From: $from or Sender: $sender\n";
283         }
284
285         # git gets confused with:
286         #  "'A U Thor <u@example.com>' via foo" <foo@example.com>
287         # ref:
288         # <CAD0k6qSUYANxbjjbE4jTW4EeVwOYgBD=bXkSu=akiYC_CB7Ffw@mail.gmail.com>
289         if (defined $name) {
290                 $name =~ tr/<>//d;
291                 utf8::encode($name);
292         } else {
293                 $name = '';
294                 warn "no name in From: $from or Sender: $sender\n";
295         }
296         ($name, $email);
297 }
298
299 # kill potentially confusing/misleading headers
300 sub drop_unwanted_headers ($) {
301         my ($mime) = @_;
302
303         $mime->header_set($_) for qw(bytes lines content-length status);
304         $mime->header_set($_) for @PublicInbox::MDA::BAD_HEADERS;
305 }
306
307 # used by V2Writable, too
308 sub append_mid ($$) {
309         my ($hdr, $mid0) = @_;
310         # @cur is likely empty if we need to call this sub, but it could
311         # have random unparseable crap which we'll preserve, too.
312         my @cur = $hdr->header_raw('Message-ID');
313         $hdr->header_set('Message-ID', @cur, "<$mid0>");
314 }
315
316 sub v1_mid0 ($) {
317         my ($mime) = @_;
318         my $hdr = $mime->header_obj;
319         my $mids = mids($hdr);
320
321         if (!scalar(@$mids)) { # spam often has no Message-Id
322                 my $mid0 = digest2mid(content_digest($mime));
323                 append_mid($hdr, $mid0);
324                 return $mid0;
325         }
326         $mids->[0];
327 }
328 sub clean_tree_v2 ($$$) {
329         my ($self, $w, $keep) = @_;
330         my $tree = $self->{-tree} or return; #v2 only
331         delete $tree->{$keep};
332         foreach (keys %$tree) {
333                 print $w "D $_\n" or wfail;
334         }
335         %$tree = ($keep => 1);
336 }
337
338 # returns undef on duplicate
339 # returns the :MARK of the most recent commit
340 sub add {
341         my ($self, $mime, $check_cb) = @_; # mime = Email::MIME
342
343         my ($name, $email) = extract_author_info($mime);
344         my $hdr = $mime->header_obj;
345         my @at = msg_datestamp($hdr);
346         my @ct = msg_timestamp($hdr);
347         my $author_time_raw = git_timestamp(@at);
348         my $commit_time_raw = git_timestamp(@ct);
349         my $subject = $mime->header('Subject');
350         $subject = '(no subject)' unless defined $subject;
351         my $path_type = $self->{path_type};
352
353         my $path;
354         if ($path_type eq '2/38') {
355                 $path = mid2path(v1_mid0($mime));
356         } else { # v2 layout, one file:
357                 $path = 'm';
358         }
359
360         my ($r, $w) = $self->gfi_start;
361         my $tip = $self->{tip};
362         if ($path_type eq '2/38') {
363                 _check_path($r, $w, $tip, $path) and return;
364         }
365
366         drop_unwanted_headers($mime);
367
368         # spam check:
369         if ($check_cb) {
370                 $mime = $check_cb->($mime) or return;
371         }
372
373         my $blob = $self->{mark}++;
374         my $str = $mime->as_string;
375         my $n = length($str);
376         $self->{bytes_added} += $n;
377         print $w "blob\nmark :$blob\ndata ", $n, "\n" or wfail;
378         print $w $str, "\n" or wfail;
379
380         # v2: we need this for Xapian
381         if ($self->{want_object_info}) {
382                 chomp(my $oid = $self->get_mark(":$blob"));
383                 $self->{last_object} = [ $oid, $n, \$str ];
384         }
385         my $ref = $self->{ref};
386         my $commit = $self->{mark}++;
387         my $parent = $tip =~ /\A:/ ? $tip : undef;
388
389         unless ($parent) {
390                 print $w "reset $ref\n" or wfail;
391         }
392
393         utf8::encode($subject);
394         print $w "commit $ref\nmark :$commit\n",
395                 "author $name <$email> $author_time_raw\n",
396                 "committer $self->{ident} $commit_time_raw\n" or wfail;
397         print $w "data ", (length($subject) + 1), "\n",
398                 $subject, "\n\n" or wfail;
399         if ($tip ne '') {
400                 print $w 'from ', ($parent ? $parent : $tip), "\n" or wfail;
401         }
402         clean_tree_v2($self, $w, $path);
403         print $w "M 100644 :$blob $path\n\n" or wfail;
404         $self->{nchg}++;
405         $self->{tip} = ":$commit";
406 }
407
408 sub run_die ($;$$) {
409         my ($cmd, $env, $rdr) = @_;
410         my $pid = spawn($cmd, $env, $rdr);
411         defined $pid or die "spawning ".join(' ', @$cmd)." failed: $!";
412         waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish';
413         $? == 0 or die join(' ', @$cmd) . " failed: $?\n";
414 }
415
416 sub done {
417         my ($self) = @_;
418         my $w = delete $self->{out} or return;
419         my $r = delete $self->{in} or die 'BUG: missing {in} when done';
420         print $w "done\n" or wfail;
421         my $pid = delete $self->{pid} or die 'BUG: missing {pid} when done';
422         waitpid($pid, 0) == $pid or die 'fast-import did not finish';
423         $? == 0 or die "fast-import failed: $?";
424
425         _update_git_info($self, 1) if delete $self->{nchg};
426
427         $self->lock_release;
428 }
429
430 sub atfork_child {
431         my ($self) = @_;
432         foreach my $f (qw(in out)) {
433                 close $self->{$f} or die "failed to close import[$f]: $!\n";
434         }
435 }
436
437 sub digest2mid ($) {
438         my ($dig) = @_;
439         my $b64 = $dig->clone->b64digest;
440         # Make our own URLs nicer:
441         # See "Base 64 Encoding with URL and Filename Safe Alphabet" in RFC4648
442         $b64 =~ tr!+/=!-_!d;
443
444         # We can make this more meaningful with a date prefix or other things,
445         # but this is only needed for crap that fails to generate a Message-ID
446         # or reuses one.  In other words, it's usually spammers who hit this
447         # so they don't deserve nice Message-IDs :P
448         $b64 . '@localhost';
449 }
450
451 sub clean_purge_buffer {
452         my ($oids, $buf) = @_;
453         my $cmt_msg = 'purged '.join(' ',@$oids)."\n";
454         @$oids = ();
455
456         foreach my $i (0..$#$buf) {
457                 my $l = $buf->[$i];
458                 if ($l =~ /^author .* (\d+ [\+-]?\d+)$/) {
459                         $buf->[$i] = "author <> $1\n";
460                 } elsif ($l =~ /^data (\d+)/) {
461                         $buf->[$i++] = "data " . length($cmt_msg) . "\n";
462                         $buf->[$i] = $cmt_msg;
463                         last;
464                 }
465         }
466 }
467
468 sub purge_oids {
469         my ($self, $purge) = @_;
470         my $tmp = "refs/heads/purge-".((keys %$purge)[0]);
471         my $old = $self->{'ref'};
472         my $git = $self->{git};
473         my @export = (qw(fast-export --no-data --use-done-feature), $old);
474         my ($rd, $pid) = $git->popen(@export);
475         my ($r, $w) = $self->gfi_start;
476         my @buf;
477         my $npurge = 0;
478         my @oids;
479         my ($done, $mark);
480         my $tree = $self->{-tree};
481         while (<$rd>) {
482                 if (/^reset (?:.+)/) {
483                         push @buf, "reset $tmp\n";
484                 } elsif (/^commit (?:.+)/) {
485                         if (@buf) {
486                                 $w->print(@buf) or wfail;
487                                 @buf = ();
488                         }
489                         push @buf, "commit $tmp\n";
490                 } elsif (/^data (\d+)/) {
491                         # only commit message, so $len is small:
492                         my $len = $1; # + 1 for trailing "\n"
493                         push @buf, $_;
494                         my $n = read($rd, my $buf, $len) or die "read: $!";
495                         $len == $n or die "short read ($n < $len)";
496                         push @buf, $buf;
497                 } elsif (/^M 100644 ([a-f0-9]+) (\w+)/) {
498                         my ($oid, $path) = ($1, $2);
499                         if ($purge->{$oid}) {
500                                 push @oids, $oid;
501                                 delete $tree->{$path};
502                         } else {
503                                 $tree->{$path} = 1;
504                                 push @buf, $_;
505                         }
506                 } elsif (/^D (\w+)/) {
507                         my $path = $1;
508                         push @buf, $_ if $tree->{$path};
509                 } elsif ($_ eq "\n") {
510                         if (@oids) {
511                                 my $out = join('', @buf);
512                                 $out =~ s/^/# /sgm;
513                                 warn "purge rewriting\n", $out, "\n";
514                                 clean_purge_buffer(\@oids, \@buf);
515                                 $npurge++;
516                         }
517                         $w->print(@buf, "\n") or wfail;
518                         @buf = ();
519                 } elsif ($_ eq "done\n") {
520                         $done = 1;
521                 } elsif (/^mark :(\d+)$/) {
522                         push @buf, $_;
523                         $mark = $1;
524                 } else {
525                         push @buf, $_;
526                 }
527         }
528         if (@buf) {
529                 $w->print(@buf) or wfail;
530         }
531         die 'done\n not seen from fast-export' unless $done;
532         chomp(my $cmt = $self->get_mark(":$mark")) if $npurge;
533         $self->{nchg} = 0; # prevent _update_git_info until update-ref:
534         $self->done;
535         my @git = ('git', "--git-dir=$git->{git_dir}");
536
537         run_die([@git, qw(update-ref), $old, $tmp]) if $npurge;
538
539         run_die([@git, qw(update-ref -d), $tmp]);
540
541         return if $npurge == 0;
542
543         run_die([@git, qw(-c gc.reflogExpire=now gc --prune=all)]);
544         my $err = 0;
545         foreach my $oid (keys %$purge) {
546                 my @info = $git->check($oid);
547                 if (@info) {
548                         warn "$oid not purged\n";
549                         $err++;
550                 }
551         }
552         _update_git_info($self, 0);
553         die "Failed to purge $err object(s)\n" if $err;
554         $cmt;
555 }
556
557 1;
558 __END__
559 =pod
560
561 =head1 NAME
562
563 PublicInbox::Import - message importer for public-inbox
564
565 =head1 VERSION
566
567 version 1.0
568
569 =head1 SYNOPSYS
570
571         use Email::MIME;
572         use PublicInbox::Git;
573         use PublicInbox::Import;
574
575         chomp(my $git_dir = `git rev-parse --git-dir`);
576         $git_dir or die "GIT_DIR= must be specified\n";
577         my $git = PublicInbox::Git->new($git_dir);
578         my @committer = ('inbox', 'inbox@example.org');
579         my $im = PublicInbox::Import->new($git, @committer);
580
581         # to add a message:
582         my $message = "From: <u\@example.org>\n".
583                 "Subject: test message \n" .
584                 "Date: Thu, 01 Jan 1970 00:00:00 +0000\n" .
585                 "Message-ID: <m\@example.org>\n".
586                 "\ntest message";
587         my $parsed = Email::MIME->new($message);
588         my $ret = $im->add($parsed);
589         if (!defined $ret) {
590                 warn "duplicate: ",
591                         $parsed->header_obj->header_raw('Message-ID'), "\n";
592         } else {
593                 print "imported at mark $ret\n";
594         }
595         $im->done;
596
597         # to remove a message
598         my $junk = Email::MIME->new($message);
599         my ($mark, $orig) = $im->remove($junk);
600         if ($mark eq 'MISSING') {
601                 print "not found\n";
602         } elsif ($mark eq 'MISMATCH') {
603                 print "Message exists but does not match\n\n",
604                         $orig->as_string, "\n",;
605         } else {
606                 print "removed at mark $mark\n\n",
607                         $orig->as_string, "\n";
608         }
609         $im->done;
610
611 =head1 DESCRIPTION
612
613 An importer and remover for public-inboxes which takes L<Email::MIME>
614 messages as input and stores them in a ssoma repository as
615 documented in L<https://ssoma.public-inbox.org/ssoma_repository.txt>,
616 except it does not allow duplicate Message-IDs.
617
618 It requires L<git(1)> and L<git-fast-import(1)> to be installed.
619
620 =head1 METHODS
621
622 =cut
623
624 =head2 new
625
626         my $im = PublicInbox::Import->new($git, @committer);
627
628 Initialize a new PublicInbox::Import object.
629
630 =head2 add
631
632         my $parsed = Email::MIME->new($message);
633         $im->add($parsed);
634
635 Adds a message to to the git repository.  This will acquire
636 C<$GIT_DIR/ssoma.lock> and start L<git-fast-import(1)> if necessary.
637
638 Messages added will not be visible to other processes until L</done>
639 is called, but L</remove> may be called on them.
640
641 =head2 remove
642
643         my $junk = Email::MIME->new($message);
644         my ($code, $orig) = $im->remove($junk);
645
646 Removes a message from the repository.  On success, it returns
647 a ':'-prefixed numeric code representing the git-fast-import
648 mark and the original messages as an Email::MIME object.
649 If the message could not be found, the code is "MISSING"
650 and the original message is undef.  If there is a mismatch where
651 the "Message-ID" is matched but the subject and body do not match,
652 the returned code is "MISMATCH" and the conflicting message
653 is returned as orig.
654
655 =head2 done
656
657 Finalizes the L<git-fast-import(1)> and unlocks the repository.
658 Calling this is required to finalize changes to a repository.
659
660 =head1 SEE ALSO
661
662 L<Email::MIME>
663
664 =head1 CONTACT
665
666 All feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
667
668 The mail archives are hosted at L<https://public-inbox.org/meta/>
669
670 =head1 COPYRIGHT
671
672 Copyright (C) 2016 all contributors L<mailto:meta@public-inbox.org>
673
674 License: AGPL-3.0+ L<http://www.gnu.org/licenses/agpl-3.0.txt>
675
676 =cut