-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
error while trying to backup #16
Comments
So, it looks like the 'Mail' gem is failing to parse one of the date headers of an email, and imap-backup is not handling the error. The only solution I can see within imap-backup is to trap errors like this and log the fact that the email cannot be backed up (and maybe dump the contents of the email). I don't really like that solution as users might not see the log message and might end up relying on backups that are partial. An alternative is to debug the failure within Mail and try to see if it needs a patch to handle the date in question. To do this we need to work out which email is causing the failure.
Thanks, Joe |
Hello Martin, were you able to pinpoint the email that was causing the problem? |
so i changed the code of the mail gem to the following: def parsed
begin
@parsed ||= Mail.new(@body)
rescue
puts @body
exit
end
end after starting the backup, half an hour later i got an error message like this ( yay viagra spam): https://gist.github.com/martinjuhasz/49c9a8d69581ccdd068a |
The malformed date is this: In cases like this, I think the only thing to be done is to log the problem and not backup the file. |
I've released version 1.0.10 which skips unparsable messages. You get no backup, but you get a log message indicating message id and body. |
i think thats the right decision. |
got this error while importing, did fine some minutes, then crashed with this:
The text was updated successfully, but these errors were encountered: