diff options
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r-- | lib/PublicInbox/Import.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 4c007b61..77e74c13 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -401,7 +401,16 @@ sub atfork_child { sub digest2mid ($) { my ($dig) = @_; - $dig->clone->hexdigest . '@localhost'; + my $b64 = $dig->clone->b64digest; + # Make our own URLs nicer: + # See "Base 64 Encoding with URL and Filename Safe Alphabet" in RFC4648 + $b64 =~ tr!+/=!-_!d; + + # We can make this more meaningful with a date prefix or other things, + # but this is only needed for crap that fails to generate a Message-ID + # or reuses one. In other words, it's usually spammers who hit this + # so they don't deserve nice Message-IDs :P + $b64 . '@localhost'; } 1; |