Skip to content

Add an option useful for personal email archiving - #248

Open
iamamoose wants to merge 1 commit into
apache:masterfrom
iamamoose:listid-overides
Open

Add an option useful for personal email archiving#248
iamamoose wants to merge 1 commit into
apache:masterfrom
iamamoose:listid-overides

Conversation

@iamamoose

Copy link
Copy Markdown
Member

Handling List-Id's.  Ponymail likes to sort mails by the List-Id which makes a lot of sense where you have the thousands of Apache lists.  But with personal email, and certainly when you subscribe to various newsletters, or get bills, or spam that got into the archives then you end up with lots of list id's that are only used once or twice or are not useful.  Working on open source projects there's lots of lists that I'm on that I want the email to get archived, but it would be nice if it was separated out in the Ponymail UI.  So really I needed the ability to have an 'allow list' of list id's that I want to have separate, with everything else defaulting to a generic list id (being my email address where all those mails came into).

If you run with an allow: list and run import-mbox with a --lid default then all list-ids will be replaced by your --lid default unless they match the text substring in the allow list. All other list ids are displayed (so you can do a dry run and spot which you'd like on the allow list). Any on the ignore list are not printed, nothing else is done with them, it's just so you can get a smaller list of unknown list-ids displayed to decide which to add to your allow list.

Ponymail might not want to integrate this feature, or do it in a different way, but opening a PR to capture the patch and comments.

Handling List-Id's.  Ponymail likes to sort mails by the List-Id which makes a lot of sense where you have the thousands of Apache lists.  But with personal email, and certainly when you subscribe to various newsletters, or get bills, or spam that got into the archives then you end up with lots of list id's that are only used once or twice or are not useful.  Working on open source projects there's lots of lists that I'm on that I want the email to get archived, but it would be nice if it was separated out in the Ponymail UI.  So really I needed the ability to have an 'allow list' of list id's that I want to have separate, with everything else defaulting to a generic list id (being my email address where all those mails came into).

If you run with an allow: list and run import-mbox with a --lid default then all list-ids will be replaced by your --lid default unless they match the text substring in the allow list.  All other list ids are displayed (so you can do a dry run and spot which you'd like on the allow list).  Any on the ignore list are not printed, nothing else is done with them, it's just so you can get a smaller list of unknown list-ids displayed to decide which to add to your allow list.
@iamamoose

iamamoose commented Mar 28, 2023

Copy link
Copy Markdown
Member Author

Example with archiver.yaml containing

list-id:
    allow:                 apache.org,yahoogroups.com
    ignore:                xt.local,mcsv.net

And running import-mbox with --lid mark@awe.com

Then emails with no list-id will get "mark.awe.com". Emails with list-id "dev.httpd.apache.org" will keep that list-id. Emails with list-id "test.com" will get replaced by "mark.awe.com" and displayed while doing the import. Emails with list-id "fred.xt.local" will get replaced by "mark.awe.com" and not displayed while doing the import.

@sebbASF

sebbASF commented Mar 28, 2023

Copy link
Copy Markdown
Contributor

[The yaml sample is not displayed correctly]

@iamamoose

Copy link
Copy Markdown
Member Author

More background at https://awe.com/mark/blog/20230328.html

@sebbASF

sebbASF commented Mar 28, 2023

Copy link
Copy Markdown
Contributor

Seems to me what you are suggesting is a way to filter based on list-id.
That seems orthogonal to the existing —lid override option which unconditionally sets the list-id, so I think that should be kept as is.

I think the options for a given mail are:

  • if a mail has no lid, then either provide a lid or drop the mail
  • archive the mail under its existing lid
  • archive the mail under a new lid
  • ignore the mail

Would that cover your use cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants