From ArchWiki
Revision as of 06:40, 7 November 2016 by Grawlinson (talk | contribs) (add post-start hook to systemd unit)
Jump to navigation Jump to search

Not working

This doesn't work:

Patterns * ![Gmail]* “[Gmail]/Sent Mail” “[Gmail]/Starred” “[Gmail]/All Mail”

FelipeC (talk) 09:22, 7 April 2013 (UTC)

Step #1: Get the certificates

I did not need to do Isync#Step #1: Get the certificates for gmail - "CertificateFile /etc/ssl/certs/ca-certificates.crt" in the config file was suffcient - --Choubi (talk) 12:25, 9 April 2013 (UTC)

It is for when the certificate verification does not work, in which case the certificate is probably not included in the default certificates (i.e. if it is self-signed) Totony (talk) 03:04, 7 July 2015 (UTC)

Gmail sync

In my case the current git-Version did the job. It seems as there have been quite a few changes compared to 1.0.6. For sync with gmail accounts and using mutt as mail client, the option: Flatten "_" in .mbsyncrc helped a lot! It replaces the subfolders [Gmail]/.Trash etc. by [Gmail]_Trash. You can still use patterns as explained. Works perfectly, and in my case about 10x faster than offlineimap. As soon as I find the time I will go through all the documents about arch wiki and try add these remarks.

Synchronization problems with systemd timer when using "OnActiveSec"

I haven't ever used systemd timers before setting up mbsync and I am not experienced with setting up systemd services. I followed the guidelines on this wiki page to automatically run mbsync with a systemd timer, but with OnActiveSec=15min instead of 1d. The first run of the mbservice triggered by "OnBootSec" always worked, the the first run triggered by "OnActiveSec" as well, however after that the timer stopped working. When I ran systemctl list-timers, I always got n/a for "Next" and "Left". However, I managed to fix this by using OnUnitActiveSec instead of OnActiveSec, however I am not sure why this fixed it. I also run mbsync sometimes manually from emacs, not sure if there may be conflicts... So maybe someone who has experience with systemd has an explanation? Which option is "better", OnActiveSec or OnUnitActiveSec? Wiki might need to be changed accordingly. Elimik31 (talk) 15:41, 14 December 2015 (UTC)

The timer unit I currently run is slightly different from the one I originally put in the wiki a while ago, and is hopefully easier to read, so I edited the page. Thanks for pointing it out!
The two things you need in there are Persistent=true (so that the unit is restarted even if your computer was shut down) and OnCalendar=*-*-* 00/2:00:00, which reads "start the unit every year, every month, every day, every two hours at 0 minutes and 0 seconds", just like a traditional crontab. As usual, there's systemd.time(7) for more info on the syntax. Does that work for you?
Frx (talk) 21:07, 27 December 2015 (UTC)

Adding post-start hook to run notmuch

I've slightly tweaked my systemd mbsync@.service to run notmuch after mbsync has successfully executed. I'm kind of new to wikis, but I'd like to share what I've done. Is this worth adding to the wiki?

Description=Mailbox synchronization service for user %I

ExecStart=/usr/bin/mbsync -Va
ExecStartPost=/usr/bin/notmuch new

Grawlinson (talk) 06:40, 7 November 2016 (UTC)