> I have modified the scripts slightly based on recommendations on this
> thread. But this still does not work. I am just looking for mbsync to run
> every two minutes. What do most people use?

I switched recently to initial sync on starting (but maybe I'll change
that to start to first time mutt is opened) then watching mailboxes with
goimapnotifiy (ordering is done by systemd):

# override for goimapnotify@.service
[Install]
RequiredBy=mail-sync@.target
WantedBy=

[Unit]
After=mbsync@%i.service network-online.target
PartOf=mail-sync@%i.target

[Service]
SyslogIdentifier=goimapnotify-%i
Slice=app-mailsync-%i.slice


# goimapnotify config
{
  "host": "imap.gmail.com",
  "tls": true,
  "port": 993,
  "tlsOptions": {
    "rejectUnauthorized": true
  },
  "username": "user",
  "passwordCmd": "oauth2get gmail account",
  "xoauth2": true,
  "onNewMail": "systemctl start --user mbsync@account",
  "boxes": [
    "INBOX"
  ]
}
# mbsync@.service

[Unit]
Wants=network-online.target
After=network-online.target
PartOf=mail-sync@%i.target

[Service]
Type=oneshot
ExecStart=/usr/bin/mbsync -c %E/mbsync/config -V %i
Restart=on-failure
RestartSec=30
SyslogIdentifier=mbsync-%i
Slice=app-mailsync-%i.slice

[Install]
RequiredBy=mail-sync@.target


-- 
Max Gautier


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to