Commit Briefs

Omar Polo

use $mid.$partno.$ext for attachments rather than random strings

Keeps the attachment file names stable while it also allows to drop the dep on Tempfile, the unveil of /tmp and the fattr pledge promise too.


Omar Polo

build a cache of hashes for each thread

The idea is to use this cache to spot changed threads and re-export all the mail of the threads that changed. This will allow to add thread navigation hints on each exported mail and have them up-to-date. This makes the "skip if already exported" logic in mexp redundant and incomplete. pe will decide whether to export or not, and mexp blindly do the work.


Omar Polo

pe: restrict pledge

the children are pre-forked, so at runtime only "stdio" is needed.


Omar Polo

set binmode utf8 for the page file handler

avoids the "Wide character in print at ./mkindex line 152, <> line 2751" warnings.


Omar Polo

fix last sender name/date in the index

pick up the *latest* From/Date for the indexes, not what happened to be the last mail rendered in that thread. spotted by stsp@



Omar Polo

"humanize" the attachment size


Omar Polo

woops, don't extract if already did



Omar Polo

don't rely on filter-export anymore

Instead, parse the output of `mshow -t' and extract, one by one, the interesting parts. This allows to generate a better listing (we know name and size!) and to decide how to call the files (the extension is important for httpd!)


Omar Polo

export image/gif, jpeg and png too



Omar Polo

urlencode the mail/thread id

reminded by semarie@, thanks!


Omar Polo

style


Omar Polo

use File::Temp for the index pages; specify why it's not using tmppath

we can't use the tmppath pledge promise as File::Temp checks whether /tmp exists. We could unveil("/tmp", "r") and use `tmppath', but it seem misleading. (noticed after semarie@ reminded me of `tmppath')