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

Hardlink Dupes #164

Open
Mathias-Ro opened this issue Jan 20, 2021 · 4 comments
Open

Hardlink Dupes #164

Mathias-Ro opened this issue Jan 20, 2021 · 4 comments
Labels
🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors

Comments

@Mathias-Ro
Copy link

Hello,
often the same Mail is in different folders (different mail accounts at the server).
Here it would be nice to replace the mails with hardlinks.
Best regards,
Mathias

@leggewie
Copy link
Contributor

leggewie commented Jan 22, 2021

Since you are mentioning hardlinks, I will assume you refer to maildir settings only. For mbox this request is obviously impossible and unlikely to be what you had in mind. The problem then comes down to a) files are identical (same hash from a filesystem perspective) and b) files are identical for the purpose of mdedup but not for the FS.

I'd think that implementing the requested feature is likely feature creep with a lot of potential cornercases. In situation a) you are better off with existing lint binaries (I maintain fslint in Debian, that's 1 option, another is duperemove or hardlink). Just choose what suits you best. I'm not sure that b) is enough of a problem to justify to tackle it.

@Mathias-Ro
Copy link
Author

If the same mail is stored in different boxes the mails have different x-headers, so they are no dupes for linux. For the user it's the same to see his own sent mail or a hardlink of the received mail in his sent folder.
If there are forwarding rules all could use hardlinks of the same mail file.
With a little shell script I found in different organisations a medium of about 2 till 4 identical mails in different folders.

@leggewie
Copy link
Contributor

I'm not saying there is no use case for this. I'm just not sure there is enough of a use-case for mdedup to add this feature. If as you say "For the user it's the same to see his own sent mail or a hardlink of the received mail in his sent folder." then I have to wonder why the user is sending CC: to himself. I don't, for that exact reason to avoid unnecessary dupes. Others might want the dupes and want to keep them.

I'm just worried that this adds very little benefit and lots and lots of new cornercases and things to consider. Hardlinking files that are not identical brings back memories of the Xerox workcentre scandal. It's one thing to drop files. It's not the same to subtly and undetectably alter stuff. The more I think about this idea, the bigger my reservations.

@Mathias-Ro
Copy link
Author

If as you say "For the user it's the same to see his own sent mail or a hardlink of the received mail in his sent folder." then I have to wonder why the user is sending CC: to himself.

In imap folders the mail client stores a copy of the sent mails in the .sent folder of the acccount. It's the only way to see the sent mails at all his devices.

Some users or organisations use mails rules for some copys of the same mail inside the organisation. Here we also could replace the copies with hard links.

@kdeldycke kdeldycke added 🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors and removed feature request labels Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors
Projects
None yet
Development

No branches or pull requests

3 participants