My server is running out of hard disk space. The main reason is a huge amount of archived IMAP mails. Therefore my idea was to put all archived mails on my NAS and mount that folder on my server.
Here is my setup:
NAS - example.nas
popuser@nas:/root> id
uid=110(popuser) gid=31(popuser) groups=100(users),31(popuser)
A folder /media/data/ARCHIVE/
, were the popuser has rw access.
Server - example.com
popuser@server:/$ id
uid=110(popuser) gid=31(popuser) groups=31(popuser)
The IMAP folder /var/qmail/mailnames/example.com/info/Maildir/
, were the popuser has rw access.
sshfs mount
As popuser on the server, I created a folder called .ARCHIVE
in the IMAP folder as the mounting endpoint. As popuser I am mounting the NAS folder as follows:
SRC=/media/data/ARCHIVE/
MNT=/var/qmail/mailnames/example.com/info/Maildir/.ARCHIVE/
sshfs -o allow_other -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null popuser@example.nas:$SRC $MNT;
As popuser I created the following IMAP folder structure:
mkdir -p $MNT/{cur,new,tmp}
As soon I click on ARCHIVE in thunderbird, I get the following error:
Oct 8 20:40:33 server imapd: Failed to create cache file: maildir_lock (info@example.com)
Oct 8 20:40:33 server imapd: Error: Input/output error
On the server, I can create/delete files within the mounted folder as root and as popuser.
I have no clue what forces the error.