thunderbird export requires Thunderbird installaion?
Closed this issue · 1 comments
Hi,
Does the export-to-thunderbird
functionality have any requirements? I'm running in docker, since that seemed to be the suggested, or at least 'easiest' way.
The backup ran fine, and then I tried to export to Thunderbird to check how the backup looks. The ability to easily view my email backups is what I'm looking for - and what drew me to imap-backup.
I took the exact same docker run
command that was used in the backup, and simply replaced backup
with utils export-to-thunderbird my-address@gmail.com
. Full command and output below.
The result:
No such file or directory @ rb_sysopen - /root/.thunderbird/profiles.ini
Suggesting it's looking for a local Thunderbird installation.
However a) It's looking inside the docker container, right? So it would not find it there without deliberate configuration, and b) I'm running docker on Ubuntu server without a gui, so not sure if it's even possible to properly install Thunderbird 'headless' on the host...? I'm sure I can install a gui if I really wanted to, but ideally I don't want to!
Is there any solution, such as making some specific Thunderbird files available to the container as a bind mount perhaps?
Thanks in advance!
docker run -ti -v ./my-config:/config -v ./my-data:/data -v /mnt/email/imap-backup:/mnt/email/imap-backup -ti ghcr.io/joeyates/imap-backup:latest imap-backup utils export-to-thunderbird my-address@gmail.com -c /config/imap-backup.json
/usr/local/bundle/gems/thunderbird-0.3.0/lib/thunderbird/profiles.rb:37:in `initialize': No such file or directory @ rb_sysopen - /root/.thunderbird/profiles.ini (Errno::ENOENT)
from /usr/local/bundle/gems/thunderbird-0.3.0/lib/thunderbird/profiles.rb:37:in `open'
from /usr/local/bundle/gems/thunderbird-0.3.0/lib/thunderbird/profiles.rb:37:in `blocks'
from /usr/local/bundle/gems/thunderbird-0.3.0/lib/thunderbird/profiles.rb:24:in `installs'
from /app/lib/imap/backup/cli/utils.rb:123:in `thunderbird_profile'
from /app/lib/imap/backup/cli/utils.rb:78:in `export_to_thunderbird'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/invocation.rb:116:in `invoke'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor.rb:338:in `block in subcommand'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
from /usr/local/bundle/gems/thor-1.3.1/lib/thor/base.rb:584:in `start'
from /app/lib/imap/backup/cli.rb:69:in `start'
from /app/bin/imap-backup:16:in `block in <main>'
from /app/lib/imap/backup/logger.rb:58:in `sanitize_stderr'
from /app/bin/imap-backup:15:in `<main>'
Yes, a Thunderbird installation (real or fake) is required. The export needs to discover the default profile and its path.
You can certainly fake that by mounting a volume at /root/.thunderbird
with a profiles.ini
and the required profile folders.
It's similar to what imap-backups
's test does here. Maybe you can use the test as a guide.