Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

offlineimap migration script might corrupt messages #1

Closed
anarcat opened this issue Apr 25, 2018 · 6 comments
Closed

offlineimap migration script might corrupt messages #1

anarcat opened this issue Apr 25, 2018 · 6 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Apr 25, 2018

Hi!

i couldn't help but notice that the suggested way of removing the X-Offlineimap markers might corrupt existing messages if they happen to have a line that starts with that string elsewhere in the message, for example in the body or in an attachment. Shouldn't there be something that keeps the modification restricted to the headers of files?

@anarcat
Copy link
Contributor Author

anarcat commented Apr 25, 2018

i ended up rolling my own script here:

https://gitlab.com/anarcat/scripts/blob/master/strip_header

it seems to work more reliably than the sed pattern.

@gares
Copy link
Owner

gares commented Apr 25, 2018

Thanks! If you submit a PR with your script I'd gladly merge it. Or you prefer to keep the script in your repo?

@anarcat
Copy link
Contributor Author

anarcat commented Apr 25, 2018 via email

@gares
Copy link
Owner

gares commented Apr 25, 2018

I would call it misc/strip-X-OfflineIMAP and link it from the README.md (with little doc) instead of having the sed line. Also the docstring of your code needs to remove the mention to sed, since it is going away!

@anarcat
Copy link
Contributor Author

anarcat commented Apr 25, 2018

i think i'll stick with strip-header because it is possible to strip other headers with it, if you don't mind. i'll tweak the sed reference to take into account it is going away as well.

@anarcat
Copy link
Contributor Author

anarcat commented Apr 25, 2018

@gares #3 available for your review! :)

@gares gares closed this as completed in #3 Apr 26, 2018
@anarcat anarcat changed the title suggested offlineimap migration script might corrupt messages offlineimap migration script might corrupt messages May 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants