Hi there, I'm setting up MU4E and having an issue with both mbsync and offlineimap.
Authentication is fine, and the directory structure after my specified MAILDIR is created.
However, a temp file is not found (because, presumably, it is not created) and an error results.
The various online guides guides and the Arch wiki don't mention this issue. So, I feel I'm missing something fundamental.
I tried to ask for help on r/linuxquestions previously but that thread went cold.
\*system setup\*
-KDE NEON (Ubuntu 20.04 base, KDE Plasma 5.25, Wayland)
-Device = Surface Go v1 (128,8)
My `.offlineimaprc` looks like (some info anonymised in <brackets>):
```
[general]
# GmailAcccount, OutlookAccount
accounts = GmailAccount, OutlookAccount
# ----------- Gmail Account -----------
[Account GmailAccount]
localrepository = LocalGmailAccount remoterepository = RepositoryGmailAccount quick = 10
[Repository LocalGmailAccount]
type = Maildir localfolders = /media/<USER>/Storage\_512/Maildir/GmailAccount
[Repository RepositoryGmailAccount]
type = Gmail maxconnections = 2 remoteuser = <USER>@gmail.com remotepass = <PASS> sslcacertfile = /etc/ssl/certs/ca-certificates.crt
# ----------- OutlookAccount -----------
[Account OutlookAccount]
localrepository = LocalOutlookAccount remoterepository = RemoteOutlookAccount
[Repository LocalOutlookAccount]
type = Maildir localfolders = /media/<USER>/Storage\_512/Maildir/OutlookAccount
[Repository RemoteOutlookAccount]
type = IMAP ssl = yes remotehost = outlook.office365.com remoteuser = <USER>@<EMAIL> remotepass = <PASS> sslcacertfile = /etc/ssl/certs/ca-certificates.crt
```
\*the issue\*
Full error with tracebacks below (also some info anonymised in <brackets>):
```
OfflineIMAP 7.2.3
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (system), Python v2.7.18, OpenSSL 1.1.1f 31 Mar 2020
Account sync GmailAccount:
*** Processing account GmailAccount
Establishing connection to imap.gmail.com:993 (RepositoryGmailAccount)
Folder [Gmail]/All Mail [acc: GmailAccount]:
Syncing [Gmail]/All Mail: Gmail -> Maildir
Folder [Gmail]/Archive [acc: GmailAccount]:
Syncing [Gmail]/Archive: Gmail -> Maildir
Establishing connection to imap.gmail.com:993 (RepositoryGmailAccount)
Copy message UID 2 (1/1) RepositoryGmailAccount:[Gmail]/Archive -> LocalGmailAccount:[Gmail].Archive
Copy message from RepositoryGmailAccount:[Gmail]/Archive:
ERROR: Copying message 2 [acc: GmailAccount]
[Errno 2] No such file or directory: '/media/<USER>/Storage_512/Maildir/GmailAccount/[Gmail].Archive/tmp/1663665831_0.5316.<USER>surfacego,U=2,FMD5=312a26d26d7c877e152f72dd5ddbc11f:2,S'
Thread 'Copy message from RepositoryGmailAccount:[Gmail]/Archive' terminated with exception:
Traceback (most recent call last):
File "/usr/share/offlineimap/offlineimap/threadutil.py", line 160, in run
Thread.run(self)
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/offlineimap/offlineimap/folder/Gmail.py", line 289, in copymessageto
super(GmailFolder, self).copymessageto(uid, dstfolder, statusfolder, register)
File "/usr/share/offlineimap/offlineimap/folder/Base.py", line 844, in copymessageto
new_uid = dstfolder.savemessage(uid, message, flags, rtime)
File "/usr/share/offlineimap/offlineimap/folder/Maildir.py", line 393, in savemessage
tmpname = self.save_to_tmp_file(messagename, content)
File "/usr/share/offlineimap/offlineimap/folder/Maildir.py", line 318, in save_to_tmp_file
os.O_EXCL|os.O_CREAT|os.O_WRONLY, 0o666)
OSError: [Errno 2] No such file or directory: '/media/<USER>/Storage_512/Maildir/GmailAccount/[Gmail].Archive/tmp/1663665831_0.5316.<USER>surfacego,U=2,FMD5=312a26d26d7c877e152f72dd5ddbc11f:2,S'
Last 3 debug messages logged for Copy message from RepositoryGmailAccount:[Gmail]/Archive prior to exception:
thread: Register new thread 'Copy message from RepositoryGmailAccount:[Gmail]/Archive' (account 'GmailAccount')
imap: Returned object from fetching 2: 'Delivered-To: <USER>@gmail.com
Received: by 10.194.202.162 with SMTP id kj2csp1293295wjc;
Wed, 28 Jan 2015 06:34:00 -0800 (PST)
Return..."></body></html>
--001a11c3226617f971050db7431c--
'
maildir: Write mail '[Gmail].Archive:2' with flags set(['S'])
ERROR: Exceptions occurred during the run!
ERROR: Copying message 2 [acc: GmailAccount]
[Errno 2] No such file or directory: '/media/<USER>/Storage_512/Maildir/GmailAccount/[Gmail].Archive/tmp/1663665831_0.5316.<USER>surfacego,U=2,FMD5=312a26d26d7c877e152f72dd5ddbc11f:2,S'
Folder [Gmail]/Drafts [acc: GmailAccount]:
Syncing [Gmail]/Drafts: Gmail -> Maildir
Traceback:
File "/usr/share/offlineimap/offlineimap/folder/Base.py", line 844, in copymessageto
new_uid = dstfolder.savemessage(uid, message, flags, rtime)
File "/usr/share/offlineimap/offlineimap/folder/Maildir.py", line 393, in savemessage
tmpname = self.save_to_tmp_file(messagename, content)
File "/usr/share/offlineimap/offlineimap/folder/Maildir.py", line 318, in save_to_tmp_file
os.O_EXCL|os.O_CREAT|os.O_WRONLY, 0o666)
```