this post was submitted on 28 Mar 2025
14 points (93.8% liked)

Selfhosted

45885 readers
300 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

- I'm not amazingly skilled when it comes to Linux but I'm working through installing and testing #imapsync - imapsync.lamiral.info on Debian following these instructions imapsync.lamiral.info/INSTALL.… - I'm a bit confused as it talks about example config files in a configuration directory but being a bit of a dunce I'm not sure where these would have been installed and where I should be creating config files for imapsync. My objective is to eventually sync my Gmail across to another email account I have via IMAP.

you are viewing a single comment's thread
view the rest of the comments
[–] Socket462@feddit.it 1 points 2 weeks ago (3 children)

Imapsync is a (PERL?) script you download, and then run it passing parameters.

If you need OAuth, and it seems so since you want to sync a Google account, you have to download some more files that help you obtain an access token for Gmail.

But as far as I remember, there are no config files needed to run it. Infact I am cron running it every 5 minutes to one way sync an IMAP account to Office365 (needs an OAuth token too, and a second script to refresh the token every hour)

Feel free to ask for more, but I cannot guarantee a timely response.

[–] abeorch@friendica.ginestes.es 1 points 2 weeks ago (1 children)

@Socket462 Thanks yeah. I think you are right. I have managed to have some success with extracting emails from #Gmail using #imapsync. I've done a couple of test runs but think that I have an issue with labels (basically I end up with emails in the All Mail folder but not in Sent or Inbox ) so I think I need to look at the options a bit.

Where should I / would you keep scripts that I create to run either one off or on a regular basis ? Should I create a folder in /etc/imapsync ? I have never really understood the folder structure of Linux despite trying to read up on it a few times.

[–] Socket462@feddit.it 1 points 2 weeks ago (1 children)

You can remap IMAP source folder to destination folder. It's very likely that sent folder needs to be remapped between different hosts. I suggest you to use the dry-run option and examine the log to see if the folders are correctly mapped.

More in detail, I created an user just to run imapsync as a good practice in Linux. Then downloaded imapsync in a subfolder of the user home directory, created two very simple scripts, one with the imapsync command with all the parameters I needed and one for the token. Lastly, using crontab -e, I added two entry one for each script.

You don't need to put imapsync into etc, it is not a binary and, as far as I know, there is no package that you can install with a package manager, it's just a script that you download and execute. Anyway, where you put that, its up to you.

[–] abeorch@friendica.ginestes.es 1 points 2 weeks ago

@Socket462 Yeah I did some dry runs and the folders maoped but I think its something about the labels .. Ill dig further.

That info about running via cron is really useful.

load more comments (1 replies)