Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailMover configuration accepts a regex folder, but fails silently #314

Open
naegling opened this issue Oct 13, 2021 · 4 comments
Open

MailMover configuration accepts a regex folder, but fails silently #314

naegling opened this issue Oct 13, 2021 · 4 comments

Comments

@naegling
Copy link

While considering changes to MailMover to address, I realized the mailmover configuration seemed overly complex for its task. Why not just a list of pairs (query, target_folder)? All mail that satisfy the query that are not already in target_folder are moved. Also yields a natural way to handle cloning vs moving. (i.e. multiple copies vs 1st move only).

Anyone have any thoughts? Of course, if implemented, I'll send a PR.

@GuillaumeSeren
Copy link
Collaborator

Hello @naegling ,
sorry to reply late and welcome to the project.

The code for the MailMover is far form ideal and patches are welcome (with tests as much as possible).

Regarding you issue, please link the documentation that would be wrong, what version, configurations etc.

@naegling
Copy link
Author

naegling commented Oct 31, 2021

Thanks @GuillaumeSeren . Where is the best place to discuss what I have in mind? here or irc? I know what I want, but would prefer an implementation others could use as well. I can post an RFC analogue.

@GuillaumeSeren
Copy link
Collaborator

Hey @naegling ,
the best place is here as everyone can read and participate.

Please explain a more precise case on the issue,
we'll try to work a fix if needed.

@naegling
Copy link
Author

naegling commented Nov 2, 2021

Original post covered 2 topics. I will continue here with the bug report and open a new topic for the proposed enhancement.

MailMover accepts a folder list containing a regex. The regex even almost works. matching messages are queried in MailMover.py:64, but then all matching messages are silently discarded by MailMover.py:69. Three fix suggestions:

  1. update docs to say 'don't do that'
  2. update settings.py to prohibit 'did that'
  3. update MailMover.py to enable 'doing that'

Although I initiated this report, I am no longer impacted by it. Instead, I am implementing a FolderTagSync feature to maintain a simple 1-1 correspondence between tags and MailDir folders (for those of us saddled with o365). I will open a enhancement post for discussion leading to a PR if desired by the community,

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

No branches or pull requests

2 participants