sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
243 stars 96 forks source link

Export archives in eml format #1581

Closed SansPseudoFix closed 9 months ago

SansPseudoFix commented 1 year ago

Expected Behavior

To make sympa archives easy to import into Thunderbird, it would be appreciated to have .eml extension. Thus, it would be as simple as copying and pasting the folder into the local folder or using an import add-on.

Current Behavior

No extension means we have to add .eml to every files. Not an easy thing for non-technical people.

Possible Solution

Here a snippet made by @ldidry for Framalistes:

@@ -15708,12 +15712,12 @@ sub do_arc_download {
             my ($rv, $az);
             if ($Archive::Zip::SimpleZip::VERSION) {
                 $rv = $zip->addString($message->as_string,
-                    Name => sprintf('%s/%s', $arc_dirname, $handle->basename)
+                    Name => sprintf('%s/%s.eml', $arc_dirname, $handle->basename)
                 );
                 $az = $Archive::Zip::SimpleZip::SimpleZipError;
             } else {
                 $rv = $zip->addString($message->as_string,
-                    sprintf('%s/%s', $arc_dirname, $handle->basename));
+                    sprintf('%s/%s.eml', $arc_dirname, $handle->basename));
                 $az = 'unknown error';
             }
             unless ($rv) {

Context

Framalistes deletes archives older than 12 months now, so it would be handy for users to have easy to use archive files to import (into Thunderbird, at least).

ikedas commented 1 year ago

Hi @SansPseudoFix ,

I feel your suggestion makes sense. How about submitting your suggestion as a pull request?