Hello all,

I have a few mailboxes running on mailcow. I am using my iphone as a client for all of them but one in particular is not updating.

When I try to refresh and check for new mail from my iphone I get the following error in the dovecot log:
imap(karlito@XXX)<945><G2h/6dj1w9RWsZQf>: Error: Mailbox INBOX: UID=690: read() failed: read(/var/vmail/XXX/karlito/Maildir/cur/1677030501.M849176P15478.63ee728bab29,S=34003,W=34891:2,Sb) failed: Decryption error: no private key available (read reason=12/12 headers not cached (first=BCC) (Mail has other cached fields, reset_id=1677030425))

Things get even weirder - one of the mailboxes the does work, if I try to set it up with Thunderbird, the server and username are discovered, however when I try to fetch the mail I get the same error as above, even tho this particular mailbox is working on my iphone:
imap(poshta@XXX)<1060><Fm5+9Nj1wshWsZQf>: Error: Mailbox INBOX: UID=1: read() failed: read(/var/vmail/XXX/poshta/Maildir/cur/1677030121.M387659P15285.63ee728bab29,S=9970,W=10111:2,S) failed: Decryption error: no private key available (read reason=4/14 headers not cached (first=NEWSGROUPS) (Mail has other cached fields, reset_id=1677030122))

Does anybody know what the issue may be?
I am really lost and need my mail to work..

Thanks!

  • Luckily I managed to recover my mail as the backups (which included crypt volume) were stored on NFS which get’s daily backups and the mailcow server has a cronjob to write a new backup daily.
    I started attempting a restore of crypt from each of the backups and attempting which one will decrypt my email.
    After all the mail was decrypted I restored the latest key I had in the crypt backup and encrypted all the mail with it.

    Regardless still not sure how the issue occurred in the first place, I restored mailcow some days ago but the issue seems to have appeared afterwards and still a full restore which includes crypt should have restored the original keys.

From within the container I have verified both paths referenced, do exist:
root@100fbafb95d1:/# ls -l /var/vmail/XXX/karlito/Maildir/cur/1677030501.M849176P15478.63ee728bab29\,S\=34003\,W\=34891\:2\,Sb
-rw------- 1 vmail vmail 13350 Feb 13 2022 '/var/vmail/XXX/karlito/Maildir/cur/1677030501.M849176P15478.63ee728bab29,S=34003,W=34891:2,Sb'
root@100fbafb95d1:/# ls -l /var/vmail/XXX/poshta/Maildir/cur/1677030121.M387659P15285.63ee728bab29,S=9970,W=10111:2,S
-rw------- 1 vmail vmail 5714 Aug 4 2021 '/var/vmail/XXX/poshta/Maildir/cur/1677030121.M387659P15285.63ee728bab29,S=9970,W=10111:2,S'
root@100fbafb95d1:/#

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

Furthermore my keys also exist (and are getting backed up daily):
[root@i-09537060f414da791 ~]# ls -l /var/lib/docker/volumes/mailcowdockerized_crypt-vol-1/_data/*pem
-rw------- 1 401 root 241 Feb 23 17:15 /var/lib/docker/volumes/mailcowdockerized_crypt-vol-1/_data/ecprivkey.pem
-rw-r--r-- 1 401 root 178 Feb 23 17:15 /var/lib/docker/volumes/mailcowdockerized_crypt-vol-1/_data/ecpubkey.pem
[root@i-09537060f414da791 ~]#

Any help will be greatly appreciated..

This seems to be an issue the mailcow community is not very keen on providing support for or is simply somewhat of uncharted territory.

I found numerous discussions online from the past 2 years similar to my problem and no clear resolution seems to exist.

Here are some of the other discussions:
mailcow/mailcow-dockerized2395
mailcow community Icon Mail cant be read/decrypt after restore


mailcow community Icon Can't restore to a new server
mailcow community Icon mailcow communityDiscussion
Can't restore to a new server
R reed
Hi, I have an issue and I din’t know how to solve it… I have 2 dedicated VPS. The main one works well with Mailcow but I must change to another VPS server. First, I update Mailcow using update.sh, then, I follow the documentation and backup Mailcow
mailcow community
3 2

mailcow community Icon IMAP Issues
mailcow community Icon mailcow communityDiscussion
IMAP Issues
R rupertchandler
Hi, On latest update and having an odd issue with IMAP connections. Add a new account and the email client (Unibox/EMclient) downloads email from account without a problem, but from that point on is unable to update to see new mail. However Outlook works without an a problem. Very odd! Can’t see
mailcow community
7 2

mailcow community Icon Certain Emails No Longer Loading / Corrupted
mailcow community Icon mailcow communityDiscussion
Certain Emails No Longer Loading / Corrupted
Author avatar image UpperCenter
Hi All, I’ve recently discovered that a handful of emails from a few months ago have corrupted somehow, and are no longer loading in the WebUI or via 3rd party clients (Thunderbird) See above, I’m able to send and recieve mail just fine, but these emails just don’t load and I can’t seem to
mailcow community
5 2

At this point there are 2 things I have to attempt with the hope of recovering my mail (2000+ messages).

1) Do a full backup of mailcow on existing host, restore it to a new temporary host, sync the restored mail from temp to existing host.
2) If 1) doesn’t work, will need to attempt the mailcow migration detailed in https://docs.mailcow.email/en/i_u_m/i_u_m_migration/

to a dummy server and then try to sync my mail from there.

Anyways this seems to be a brutal PITA and am heavily disappointed it hasn’t been documented properly in the mailcow docs considering the amount of people who encountered this issue over the past 2 years.

Luckily I managed to recover my mail as the backups (which included crypt volume) were stored on NFS which get’s daily backups and the mailcow server has a cronjob to write a new backup daily.
I started attempting a restore of crypt from each of the backups and attempting which one will decrypt my email.
After all the mail was decrypted I restored the latest key I had in the crypt backup and encrypted all the mail with it.

Regardless still not sure how the issue occurred in the first place, I restored mailcow some days ago but the issue seems to have appeared afterwards and still a full restore which includes crypt should have restored the original keys.

No one is typing