#isync

#isync, mon amour.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2024-12-11

I tried #isync + #gitAnnex + #notmuch which is cool, but weirdly only one-way and only really works when run from a single machine as it's stateful. I can't move around mails and make folders etc and git annex drop mails and keep others to decide what's on the server and what's not. It gets messy. Feels like it's a very nice solution to grab mail from the server and then manage it only locally and sync it around with git annex, but not if you want your mails e.g. on your phone client as well.

Helge Heßhelge
2024-11-04

"Ready to synchronize T68i".

Screenshot of Apple's iSync application, featuring a lot of brushed metal looks.

@alexconquer C'est un des outils du paquet #isync.

isync.sourceforge.io/

Celui-ci en particulier permet la synchronisation de comptes IMAP, en ligne de commande. #CLI

2024-08-06
I created a ticket for #isync addressing the #Fedora 40 issue: https://sourceforge.net/p/isync/patches/19/
2024-08-05

I started my own fork of #isync (or #mbsync)

https://codeberg.org/jarkko/isync

It has now couple of commits:

❯ git log --oneline -2
8ea62c9 (HEAD -> main, origin/main) fix: compile with -fno-lto
f5782aa refactor: open code FORCEASYNC far and near parameters

The first is the fix for crash in #Fedora. The second open codes FORCEASYNC:

diff --git a/src/common.h b/src/common.h
index 940e74d..22bd827 100644
--- a/src/common.hb
+++ b/src/common.h
@@ -120,7 +120,8 @@ BIT_ENUM(
        ZERODELAY,
        KEEPJOURNAL,
        FORCEJOURNAL,
-       FORCEASYNC(2),
+       FORCEASYNC_F,
+       FORCEASYNC_N,
        FAKEEXPUNGE,
        FAKEDUMBSTORE,
 )

I plan to do this for all of those, as it allows to cut some slack out from bit_enum_get.pl. That will lead to a roadmap where eventually the whole ugly script can be rendered out replaced with BIT_UL macro from kernel (msync is GPL 2.0 licensed).

There is also a #zig branch but before build can be defined properly the C codebase first needs to be made sound in terms of the build. Then it is relatively easy task to repeal and replace main.c with main.zig.

#email

2024-08-01
(gdb) print boxes
$1 = {0x5555556c4540, <optimized out>}

I noticed this so I tried:

diff --git a/src/main_sync.c b/src/main_sync.c
index 226e324..afb23ca 100644
--- a/src/main_sync.c
+++ b/src/main_sync.c
@@ -623,6 +623,7 @@ sync_opened( main_vars_t *mvars, int t )
if (!mvars->chanptr->boxlist && mvars->chan->patterns) {
mvars->chanptr->boxlist = 2;
char **boxes[2];
+ __asm__ __volatile__("" :: "m" (boxes));
boxes[F] = filter_boxes( mvars->boxes[F], mvars->chan->boxes[F], mvars->chan->patterns );
boxes[N] = filter_boxes( mvars->boxes[N], mvars->chan->boxes[N], mvars->chan->patterns );
box_ent_t **mboxapp = &mvars->chanptr->boxes;

That literally fixed the bug! I.e. could this be a #GCC bug?

RT @gromit, @adamw

#mbsync #gcc #fedora #bug #isync
2024-08-01

I found a modern actively updated alternative for #isync (or #mbsync): #m2sync

It is part of #vomit project: https://sr.ht/~bitfehler/vomit/

Compared to the complexity of ~/.mbsyncrc, my config is now dead simple:

cat .config/vomit/config.toml 
[kapsi]
local = "~/.cache/mail/kapsi"
remote = "mail.kapsi.fi:993"
user = "jjs"
pass-cmd = "pass show imap/mail.kapsi.fi"

I love vomit!

2024-07-31
#mbsync always crashes here in #Fedora (even when compiled from upstream):

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055d33068a967 in sync_chans (mvars=0x7ffef80ee330, ent=<optimized out>) at /usr/src/debug/isync-1.4.4-8.fc40.x86_64/src/main.c:906
906 char *sname = boxes[N] ? boxes[N][sb] : NULL;

Any ideas? I used coredumpctl to discover this location but for comparative testing I also compiled the latest upstream of mbsync, and it crashes in the exact same location.

#isync
2024-07-31
Now that I have #isync working, the next thing I'm gonna do is to setup #vdirsyncer to sync my contacts and calendar from #iCloud, and access my contacts and calendar with khard and khal. #email #contacts
2024-07-30
I'm pretty happy with #isync. I used to use #fdm but since my imap access is fast, it was not transparent enough to be worth of trouble. isync has sort of best of both worlds.
2024-07-29
I used to use #fdm for many years, last few I've simply used #IMAP access a Finnish server, an since yesterday #isync. It gets less in the way than fdm (especially with verbatim folders) but still provides offline access and allows to use #notmuch, which integrated to #aerc. :-)

#email
2024-07-29

Improved my #email workflow a bit with #isync.

So the basic config in ~/.mbsyncrc is:

IMAPAccount kapsi
Host mail.kapsi.fi
User jjs
PassCmd "pass show imap/mail.kapsi.fi"
SSLType IMAPS

IMAPStore kapsi-remote
Account kapsi

MaildirStore kapsi-local
SubFolders Verbatim
Path ~/.mail/kapsi/
Inbox ~/.mail/kapsi/INBOX

Channel kapsi
Far :kapsi-remote:
Near :kapsi-local:
Patterns *
Create Both
Expunge Both
SyncState *

Essentially only other change I had to do was repeal and replace sources in ~/.config/aerc/accounts.conf (I was already using msmtp since many many years ago):

[personal]
source			= maildir://~/.mail/kapsi
outgoing		= msmtp -a iki.fi
default                 = INBOX
from                    = Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
copy-to                 = Sent

[kernel]
source			= maildir://~/.mail/kapsi
outgoing		= msmtp -a iki.fi
default                 = INBOX
from                    = Jarkko Sakkinen <jarkko@kernel.org>
copy-to                 = Sent
folder-map              = ~/.config/aerc/folder-maps/kernel.map

For the record kernel.map (also existed previously unrelated to this change) is just:

personal = INBOX
INBOX = kernel

I use this magic given that @kernel.org routes to a sub-address of the same account.

Have been planning to level up here for a long while so thought now is the time given tomorrow is first workday after holidays.

2024-03-02

More struggles with #offlineimap email sync handling malformed spam (unicode in the headers). I'd found a hack with manually adding the offenders' UIDs to skip lists but manual intervention is a pain.

Trying out #isync (aka mbsync) instead and already impressed by 1) easy config, 2) useful and minimal UI and 3) speeeeed.

isync's speed is hitting gmail IMAP quota issues, but that was a gig or so into a multithreaded sync -- so it goes.

2024-01-23

Is there any way to use #mbsync with the Cyrus SASL plugin, but restrict that plugin to only one mail account? Installing that plugin prevents 3 of my 4 email accounts from syncing, but the fourth requires OAUTH2 to be able to connect.

#isync #neomutt

Marcos Dionemdione@en.osm.town
2023-09-23

#til

* #isync / #mbsync works very well, but you can't have your email pre-sync'ed with f.i. #rsync. you have to let the thing sync all your emails and note it, otherwise you might end up with duplicated emails like me.

ꙮ liilliil 🇫🇯🇱🇨🇱🇧liilliil@mastodon.online
2023-09-08

Кто помнит #iSync?

Christian Tietzectietze
2023-04-18

@mph@social.lol Can relate! Switched from to /#mbsync after about a year -- way less trouble with UID problems (i.e. none) since then 👍 And no email got missing ever since. At least none I noticed.

2022-12-15

Rewriting my email processing #isync and #notmuch. A little bit of #ripmime and some shell pattex ...

... and yes, neomutt prepares also to takeover

#unix #shell #mail

in ♥️ with PDA (and 🐧)inlovewithpda@chaos.social
2022-11-03

I miss #isync ... such a great tool

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst