mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 00:46:03 +03:00
[GH-ISSUE #3004] imap-migration doesn't work properly. #1730
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1730
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lolhunter121 on GitHub (May 12, 2023).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3004
Impacted versions
Steps to reproduce
Current behavior
Expected behavior
Video/Screenshot link (optional)
@Spitfireap commented on GitHub (Jun 21, 2023):
Hi, can you elaborate ?
@lolhunter121 commented on GitHub (Jun 21, 2023):
Hmm. Comment lost.
I've added new domain.
Then added imap migration to it.
Logged in with imap account of old domain.
New user singed in - it work. Imap migration show new user.
Webmail doesn't work. No folders on disk made for new user.
Imap migration doesn't start - seems like new user stucked in "non-made" situation, or rights of made-by-hands folders are not right. So emails doesn't sync.
Maybe something not finished in scripts, witch made users by imap-migration login
@JustusW commented on GitHub (Aug 14, 2023):
I'd love to add my elaboration, but I haven't found anything that I could elaborate on? Like... What's the procedure?
No idea what to do here.
EDIT
I should note that the documentation is very confusing here. It clearly states that certain capabilities are only available in the new UI, but it very definitely exists in the old UI as well.
EDIT2
My old mailserver doesn't even show a login attempt, so clearly something isn't working as expected, I certainly can't see how this is supposed to work:
"Migrations are automatically handled when providers have been configured. Users use their old credential to log and the account is automatically created."
@lolhunter121 commented on GitHub (Aug 14, 2023):
You should open web interface with login/password from account you push.
For exmaple you had mail on gmail.
test@gmail.com : 1111111
So you add gmail imap as imap migration and try to login to new web with test@gmail.com : 1111111
As I understand - it try to login on old server. After that it should make a cron task to get mails from it.
But when I login - no maildir made and no cron tast made too.
@mateyelative commented on GitHub (Nov 6, 2023):
Hi, I am experiencing the same problem. IMAP does not sync...
Any news/updates on this issue/bug?
Thank you.
I appreciate all your hard work.
@lolhunter121 commented on GitHub (Nov 7, 2023):
I've used imapsync on vps and synced all mails.
@mateyelative commented on GitHub (Nov 7, 2023):
Oh. wouw... I owe you a lunch or something... 🤗💜
Thank you. That was awesome suggestion.
https://imapsync.lamiral.info/X/
I wish you all the best.
@michalhana99 commented on GitHub (Dec 26, 2023):
The problem persists even in version 2.2.3, synchronization of mailboxes does not start and cannot be started even manually.
I followed the instructions: https://modoboa.readthedocs.io/en/latest/moving.html
But basically I end up already at "python manage.py generate_offlineimap_config"
Do you have any news, it is possible that I am doing something wrong, we are running modoboa on debian 12 and python3 is installed and it was done using automatic installation.
Can you help?
I can't force users to enter data into an external email interface for migration
Please help
@lolhunter121 commented on GitHub (Dec 26, 2023):
You can setup imapsync locally.
https://imapsync.lamiral.info/#install
I setup it on clean LXC container and start by bash scripts.
For modoboa - didn't checked.
@vchrizz commented on GitHub (Feb 10, 2025):
I am also facing this issue using automatic installation of modoboa version 2.3.4 on clean Ubuntu 22.04 (just installed offlineimap beforehand).
Same issue is with Ubuntu 24.04.
Using Ubuntu 20.04 the automatic installation fails with a python traceback at installing modoboa:
def get_password_hashers(cls) -> list[type["PasswordHasher"]]:\nTypeError: 'type' object is not subscriptable\n'
Some elaboration from my side - after following commands:
the content of /srv/vmail/.offlineimaprc is:
Even though I defined the old provider in admin interface, logins with old accounts (as described in documentation/instructions) just fail.
I tried creating the .offlineimaprc by myself according to https://www.offlineimap.org/doc/quick_start.html
but then running offlineimap manually fails with following error:
Interestingly the connection test in new-admin at provider definition succeeds.
So this seems to be an issue at offlineimap?
@ZiganshinIB commented on GitHub (Sep 1, 2025):
It works for me.
I set it up as follows (My OS Debian 12.7 x64)
0. Installed offlineimap:
sudo apt install offlineimap
IMAP Migration -> Email Provide).sudo -u <mail_user><modoboa_env_pythorn> <modoboa_instance>/manage.py generate_offlineimap_config --output <path/to/.offlineimaprc>sudo -u vmail /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py generate_offlineimap_config --output /tmp/.offlineimaprcsudo -u <mail_user>offlineimap -c <path/to/.offlineimaprc>sudo -u vmail offlineimap -c /tmp/.offlineimaprcPYTHON=/srv/modoboa/env/bin/python
INSTANCE=/srv/modoboa/instance
MAILTO=root
30 */1 * * * vmail cd /mnt/Maildir && $PYTHON $INSTANCE/manage.py generate_offlineimap_config --output .offlineimaprc
32 */1 * * * vmail /usr/local/bin/offlineimap > /dev/null 2>&1
Operations on mailboxes
#.....