mlnoga / go-imap-backup

Backup, restore and delete emails from an IMAP server to local storage
GNU General Public License v3.0
9 stars 1 forks source link

Bug: Creating local folders and files does not seem to work properly #9

Open xvybihal opened 5 months ago

xvybihal commented 5 months ago

When i try to query or backup, there is an no such file or directory error.

When I create the missing mbox file, it continues complaining about the .idx, and so on

$ ./go-imap-backup -s mail.example.com -u user@example.com -P secret backup
List folders 100% |███████████████| (3/3, 19 it/s)        
List   0% |          | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:11:17 Error on 0. attempt: open mail.example.com/user@example.com/INBOX.mbox: no such file or directory
List folders 100% |███████████████| (3/3, 33 it/s)        
List   0% |          | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:11:27 Error on 1. attempt: open mail.example.com/user@example.com/INBOX.mbox: no such file or directory
List folders 100% |███████████████| (3/3, 33 it/s)        
List   0% |          | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:11:37 Error on 2. attempt: open mail.example.com/user@example.com/INBOX.mbox: no such file or directory
Too many errors, exiting.

$ ls
cmd.go  go-imap-backup*  go.mod  go.sum  helpers.go  imap.go  LICENSE.md  localfolder.go  main.go  Makefile  meta.go  README.md  received.go

$ mkdir -p mail.example.com/user@example.com/

$ touch mail.example.com/user@example.com/INBOX.mbox

$ ./go-imap-backup -s mail.example.com -u user@example.com -P secret backup
List folders 100% |██| (3/3, 23 it/s)        
List   0% |          | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:13:38 Error on 0. attempt: open mail.example.com/user@example.com/INBOX.idx: no such file or directory
List folders 100% |████| (3/3, 33 it/s)        
List   0% |             | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:13:48 Error on 1. attempt: open mail.example.com/user@example.com/INBOX.idx: no such file or directory
List folders 100% |████| (3/3, 33 it/s)        
List   0% |             | (0/41, 0 it/hr) [0s:0s]2024/06/06 16:13:58 Error on 2. attempt: open mail.example.com/user@example.com/INBOX.idx: no such file or directory
Too many errors, exiting.
ylluminate commented 1 month ago

Same here.