leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
444 stars 48 forks source link

Important: mcom empties drafts! #148

Closed Anachron closed 5 years ago

Anachron commented 5 years ago

When I have a draft but it somehow got messed up (no idea what I did though) and try to send it I can't see the errors (can't parse range) because I instantly get into the feedback loop (menu).

I chose send (because I wasn't aware of the errors) and it tried to send but destroyed the draft file! It said it will keep the draft, but the file was empty. The example.txt.mine was alright, but the mail itself (example.txt) was empty.

The following is my shell output.

used draft example.txt
can't parse range: example.txt
can't parse range: example.txt
What now? (mime and [s]end, [c]ancel, [d]elete, [e]dit, [m]ime, sign, encrypt) s
can't parse range: example.txt
can't parse range: example.txt
can't parse range: example.txt.mime
msmtp: keine Empfänger gefunden
mcom: /usr/bin/msmtp -t failed, kept draft example.txt
Anachron commented 5 years ago

I was able to reproduce it!

  1. Create a message via mcom, give it a wrong FROM:-field (as in: Something that doesn't send).
  2. Cancel and open again using mcom -r <draft-file>.
  3. Cancel the mail now, you will get the following error: can't parse range: snd.0.
  4. The <draftfile> is empty now. The <draftfile>.mime is fine.
Anachron commented 5 years ago

Solved with https://github.com/chneukirchen/mblaze/commit/d6c2470ad12253fe12287bb8f825887fc38bf320.