jon6fingrs / mbsync-dovecot

example docker compose file for dovecot and mbsync
GNU General Public License v3.0
24 stars 0 forks source link

mbsync-Image - User and cron issues #5

Open andbez opened 1 month ago

andbez commented 1 month ago

Hi,

thank you for providing your setup and images. I got all up and running. Even extended the setup with roundcubemail behind traefik. It works great until the first sync of mbsync finished. After the first run, i got always errors like "can not open near/far..." and sudo errors. After analyzing i found following issues:

  1. Crontab: The Entry for User 1000 starts with sudo -i mbsync but there is no user mbsync in the image. I adjusted to user ubuntu (PID 1000 in the image) and it worked.
  2. the near error occurs because of an error in mbsync (found https://sourceforge.net/p/isync/bugs/77/?limit=25). I adjusted the Patterns-Entry to INBOX* and it works.

i am using follwing image: thehelpfulidiot/mbsync:latest

Is it only me, who has this issues? Did i do something wrong? Any help appriciated.

Thank you.

PS: As suggested i am using PUID 1000 in the Compose-File, but 1000 is already used in the ubuntu image, so the command in the dockerfile/run.sh for creating the user mbsync fails (i expect). So using another PUID different from 1000 (e.g. 1010) would work. Testing tomorrow 😄

jon6fingrs commented 1 month ago

Hi,

thank you for providing your setup and images. I got all up and running. Even extended the setup with roundcubemail behind traefik. It works great until the first sync of mbsync finished. After the first run, i got always errors like "can not open near/far..." and sudo errors. After analyzing i found following issues:

  1. Crontab: The Entry for User 1000 starts with sudo -i mbsync but there is no user mbsync in the image. I adjusted to user ubuntu (PID 1000 in the image) and it worked.

  2. the near error occurs because of an error in mbsync (found https://sourceforge.net/p/isync/bugs/77/?limit=25). I adjusted the Patterns-Entry to INBOX* and it works.

i am using follwing image: thehelpfulidiot/mbsync:latest

Is it only me, who has this issues? Did i do something wrong?

Any help appriciated.

Thank you.

PS: As suggested i am using PUID 1000 in the Compose-File, but 1000 is already used in the ubuntu image, so the command in the dockerfile/run.sh for creating the user mbsync fails (i expect). So using another PUID different from 1000 (e.g. 1010) would work. Testing tomorrow 😄

Hey thanks for letting me know about this. Will have a chance to look into it later this week. What email service do you use? I use Fastmail so have only tested it on that.

andbez commented 1 month ago

Hey, using my own EMail-Server with Courier. Thank you for your support!

jon6fingrs commented 1 month ago

I fixed the user issue with cron. I changed the command to a small if statement so that if the user id already exists, it will change the username to mbsync and not try to create a new one. I am not able to recreate the other error. I guess I could just add another environment variable to specify the patterns-entry and by default keep it as is?

andbez commented 1 month ago

Hi. Thank you for your support. That's great news. Your suggestion would work for me. I really appreciate your work!