Exchange + Davmail + Offlineimap to Isync

2,122 views
Skip to first unread message

Paul Harper

unread,
Apr 13, 2016, 4:07:09 PM4/13/16
to mu-discuss

I am able to get offlineimap working with Davmail so I can talk to my work Exchange server. But I find offlineimap a bit flakey. I get the following error message frequently:

Error running timer: (error #("[mu4e] Update process is already running" 1 5 (face mu4e-title-face))) [5 times]

So I want to try isync. Below is my working offlineimaprc file. It has the Work Microsoft Exchange account going through Davmail and the Personal Gmail account.I thought this would be a common scenario but my Google-Fu has failed me. 

I can get the Gmail part working in my mbsyncrc without issue. How do I translate the Work section of the offlineimaprc to something that works in the mbsyncrc? I am a little lost on how to use two accounts with isync as well?   Connecting to mu4e appears straight forward as per this article which brought me to mu4e in the first place. 


[Account Work]
localrepository = Work-Local
remoterepository = Work-Remote

[Repository Work-Local]
type = Maildir
localfolders = ~/Maildir/Work

[Repository Work-Remote]
type = IMAP
remotehost = localhost
remoteport = 1143
cert_fingerprint =
maxconnections = 3
remoteuser = domain\user
remotepass = mysecretpassword
holdconnectionopen = true
keepalive = 120
realdelete = yes

# Folders to skip during sync. (You can set up which ones your self, this is just an example)
#folderfilter = lambda folder: folder in ['INBOX', 'Sent']


[Account Personal]
localrepository = Personal-Local
remoterepository = Personal-Remote

[Repository Personal-Local]
type = Maildir
localfolders = ~/Maildir/Personal

[Repository Personal-Remote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = us...@gmail.com
remotepass = mysecretpassword
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
keepalive = 120
maxconnexions = 3
realdelete = yes
holdconnectionopen = true
folderfilter = lambda foldername: foldername not in ['[Gmail]/Spam', '[Gmail]/All Mail', '[Gmail]/Starred', '[Gmail]/Important']


Thanks and Regards,

Paul

Ben Swift

unread,
Apr 13, 2016, 7:09:53 PM4/13/16
to mu-di...@googlegroups.com
Hi Paul

This might be helpful:

https://github.com/benswift/.dotfiles/blob/master/mbsyncrc

Cheers,
Ben

Paul Harper <harper...@gmail.com> writes:

> I am able to get offlineimap working with Davmail
> <http://davmail.sourceforge.net/> so I can talk to my work Exchange server.
> But I find offlineimap a bit flakey. I get the following error message
> frequently:
>
> Error running timer: (error #("[mu4e] Update process is already running" 1
> 5 (face mu4e-title-face))) [5 times]
>
> So I want to try isync <https://wiki.archlinux.org/index.php/Isync>. Below
> is my working offlineimaprc file. It has the Work Microsoft Exchange
> account going through Davmail and the Personal Gmail account.I thought this
> would be a common scenario but my Google-Fu has failed me.
>
> I can get the Gmail part working in my mbsyncrc without issue. How do I
> translate the Work section of the offlineimaprc to something that works in
> the mbsyncrc? I am a little lost on how to use two accounts with isync as
> well? Connecting to mu4e appears straight forward as per this article
> which brought me to mu4e in the first place.
> <http://www.macs.hw.ac.uk/~rs46/posts/2014-01-13-mu4e-email-client.html>

Paul Harper

unread,
Apr 14, 2016, 1:14:31 AM4/14/16
to mu-discuss
Thanks Ben!

That helps with the two accounts. 

The tricky bit is the connection to the Exchange server over davmail, which goes through localhost. I have to use the domain\username and password to connect. The authentication method is unclear to me. 

Regards,

Paul

Dirk-Jan C. Binnema

unread,
Apr 14, 2016, 1:18:12 AM4/14/16
to mu-di...@googlegroups.com

On Wednesday Apr 13 2016, Paul Harper wrote:

> I am able to get offlineimap working with Davmail
> <http://davmail.sourceforge.net/> so I can talk to my work Exchange server.
> But I find offlineimap a bit flakey. I get the following error message
> frequently:
>
> Error running timer: (error #("[mu4e] Update process is already running" 1
> 5 (face mu4e-title-face))) [5 times]

Seems this is triggered by mu4e's periodic updating, it suggests that
your updates take longer than the period between them; i.e., perhaps you
want to increase `mu4e-update-interval`.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Paul Harper

unread,
Apr 14, 2016, 10:14:33 AM4/14/16
to mu-discuss
Dirk,

Thanks for the reply and the coolest email client!

I'll try mu4e-update-interval to 1200 and see if that works, then reduce. I am in South Sudan on pretty flakey Internet. 

I still would still like to figure out the Davmail/mbsyncrc settings so I can compare the two. 

Regards,

Paul

On Thursday, April 14, 2016 at 8:18:12 AM UTC+3, djcb wrote:

On Wednesday Apr 13 2016, Paul Harper wrote:

> I am able to get offlineimap working with Davmail
> <http://davmail.sourceforge.net/> so I can talk to my work Exchange server.
> But I find offlineimap a bit flakey. I get the following error message
> frequently:
>
> Error running timer: (error #("[mu4e] Update process is already running" 1
> 5 (face mu4e-title-face))) [5 times]

Seems this is triggered by mu4e's periodic updating, it suggests that
your updates take longer than the period between them; i.e., perhaps you
want to increase `mu4e-update-interval`.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema                  Helsinki, Finland

Paul Harper

unread,
Apr 30, 2016, 7:21:34 AM4/30/16
to mu-discuss
Problem Solved. 

Over on the Isync-Dev mailing list I was told that, "mbsync understands double quotes and backslash escapes that means that you need to double the backslash." https://sourceforge.net/p/isync/mailman/message/35053602/

Did that and now mbsync works. 

My complete mbsyncrc for Work looks like this: 

IMAPAccount Work
Host localhost
Port 1143
User Exchangedomainname\\username
UseIMAPS no
RequireSSL no
UseTLSv1 no
Pass MySecretPassword!

IMAPStore Work-remote
Account Work

MaildirStore Work-local 
Path ~/Maildir/Work
Inbox ~/Maildir/Work/INBOX 

Channel Work
Master :Work-remote:
Slave :Work-local:
Create Slave
Sync Pull
SyncState *


I hope that ends up being useful to other people using Exchange. 



On Wednesday, April 13, 2016 at 11:07:09 PM UTC+3, Paul Harper wrote:
Reply all
Reply to author
Forward
0 new messages