imapbox icon indicating copy to clipboard operation
imapbox copied to clipboard

Folder structure for accounts

Open vitis586 opened this issue 2 years ago • 2 comments

Hello,

I am running this in a docker container. I want to save multiple folders from single account. As imapbox does not support multiple remote folders with one account, I just duplicated the account and use different remote folder for each. Everything works, but..

The config is as follows

[imapbox] local_folder=/var/imapbox days=365 wkhtmltopdf=/opt/bin/wkhtmltopdf

[account1] host=imap.example.com [email protected] password=password remote_folder=INBOX

[account2] host=imap.example.com [email protected] password=password remote_folder=archive

[account3] host=imap.example.com [email protected] password=password remote_folder=sent

Imapbox runs and downloads all the mail, but the folder structure is following

  • home
    • INBOX
      • 2023
      • 2022
      • archive
        • 2023
        • sent
          • 2023

Imapbox runs and writes the email, but then does not go back to home and runs further in the account1 folder and that just continues. I would expect to have the remote folders as subfolders in home. I bet that it is something simple, but I am not on that level yet. :)

I am not sure how to name this issue, so you might come up with something better than I did.

vitis586 avatar Mar 18 '23 09:03 vitis586

https://github.com/polo2ro/imapbox/blob/6c7f4a436c121b17e24fb4590db05ac6014652f3/imapbox.py#L108

you should try with a comma, the readme is probably not up to date

polo2ro avatar Mar 21 '23 20:03 polo2ro

Yes, you are correct. More remote folders are indeed supported that way. When I used remote_folder=INBOX,sent instead of multiple account, it went as expected. I would go with a separate container for multiple accounts anyway, because I would want a different local folders.

vitis586 avatar Mar 28 '23 18:03 vitis586