Public mailboxes disappeared?

NethServer Version: 7.9.2009
Module: dovecot?

So this morning was I looking through my shared mailboxes, I use them to catch mail with the wrong recipients and to receive mail from servers. That worked fine and I forwarded a mail from my catcher mailbox but after that they became grey in Thunderbird and when I look in cockpit there are no public (shared) mailboxes listed. I even locked in the old Web UI to be sure. In the logs I can find this from when we did a test.

10:50 lmtp(vmail@nethserver.domain.tld): msgid=Nb0UoUgVyEDqnGe_rihN3LEWDgif2Ky4bGMvS3Jgttg3oVYxzJu1kSThM6ufRMckvtvN33dQeiWpLEYq1vfD6Pq3VIf6WBhWRzasZYsGPTY=@sender.tld: save failed to open mailbox catcher: Mailbox doesn’t exist: catcher

Have I started dreaming or are the mailboxes gone, and if so why and how?

To investigate:
db accounts show catcher@ (press TAB to auto-complete the account name)

grep catcher /etc/postfix/virtual

Then search for catcher in /var/log/messages.

db accounts show catcher@
catcher@=pseudonym
Access=public
Account=vmail+catcher
Description=Shared mailbox

grep catcher /etc/postfix/virtual
catcher@domain1.tld vmail+catcher
catcher@domain2.tld vmail+catcher
catcher@domain3.tld vmail+catcher
@domain1.tld vmail+catcher
@domain2.tld vmail+catcher

Nothing found in /var/log/messages for catcher

I tested for another public mailbox called system that also is missing.
db account returns system@domain3.tld returns
system@domain3.tld=pseudonym
Access=public
Account=vmail+system
Description=
grep system /etc/postfix/virtual returns
system@domain3.tld vmail+system

domain1 and domain2 are public domains and domain3 is a sub domain to domain1.

@filippo_carletti, any update?

Oops, sorry, I missed your reply.
Everything seems to be in order.
Maybe it’s a thunderbird problem, please, try roundcube or a different client.
Honestly, I think we never encountered a similar problem, I don’t have a checklist ready for troubleshooting.

I checked with Roundcube and I couldn’t find them there either. I doubt that the problem is Thunderbird since they also has disappeared from the admin interface, same problem in both cockpit and the old interface.
In Thunderbird I can still see the mailboxes but they are greyed, edit: they disappeared after a restart of the client. I checked maillog and saw that mails seems to be sent to the mailbox system. When looking in /var/lib/nethserver/vmail/vmail/Maildir/new I can see new mails that has arrived to the mailboxes after I was able to access them.

From maillog
Feb 15 12:43:48 saga dovecot: lmtp(vmail@): msgid=truenas-20210215.114322.428655.b’9OaH’@nas.subdomain.domain.tld: save failed to open mailbox system: Mailbox doesn’t exist: system
Feb 15 12:43:49 saga postfix/lmtp[2575]: C74C63F2CB: to=<vmail+system@>, orig_to=system@subdomain.domain.tld, relay=[/var/run/dovecot/lmtp], delay=21, delays=18/0.01/0.22/2.7, dsn=2.0.0, status=sent (250 2.0.0 <vmail+system@> SLNgA3NeKmAQCgAAw1SXjw Saved)
Feb 15 12:53:13 saga dovecot: lmtp(vmail@): Error: EFHaGalgKmBPDwAAw1SXjw: sieve: msgid=truenas-20210215.115313.065618.b’0idA’@nas.subdomain.domain.tld: failed to store into mailbox ‘system’: Mailbox doesn’t exist: system
Feb 15 12:53:13 saga dovecot: lmtp(vmail@): msgid=truenas-20210215.115313.065618.b’0idA’@nas.subdomain.domain.tld: save failed to open mailbox system: Mailbox doesn’t exist: system
Feb 15 12:53:13 saga postfix/lmtp[3918]: 1A2D81647: to=<vmail+system@>, orig_to=system@subdomain.domain.tld, relay=[/var/run/dovecot/lmtp], delay=0.61, delays=0.29/0.02/0.03/0.28, dsn=2.0.0, status=sent (250 2.0.0 <vmail+system@> EFHaGalgKmBPDwAAw1SXjw Saved)

From /var/lib/nethserver/vmail/vmail/Maildir/new/
-rw------- 1 vmail vmail 2367 Feb 15 12:43 1613389428.M141737P2576.,S=2367,W=2416
-rw------- 1 vmail vmail 2005 Feb 15 12:53 1613389993.M443853P3919.,S=2005,W=2049

@davidep @stephdl do you have any idea of what may have happened?

1 Like

The following command prints a list of public mailboxes base directories:

find  /var/lib/nethserver/vmail/vmail/Maildir/  -type d -name cur -printf "%h\n"

If the files are still in place, there could be some misconfiguration. I’d start with a

signal-event nethserver-mail-server-update

There should be a domain suffix after @…

Returns /var/lib/nethserver/vmail/vmail/Maildir but as I mentioned in my previous entry can I see the new mails sent to the mailboxes in /var/lib/nethserver/vmail/vmail/Maildir/new/. The folders cur and tmp are empty.

It ran for a minute and then the cursor reappeared and I see no changes. I have installed all updates and at the time when this happened no updates had been installed for a a few days and no configuration changes for an even longer time.

:fearful: I’m afraid the public mailboxes (i.e. catcher, system…) are gone…

That is worrying, not that they contained anything that was important but I it would help to understand what happened. The oldest mail in the new folder is dated 2021-02-07 00:00 so probably did it happen sometimes before that but unfortunately are all the backups from after that date.

db accounts lists the missing mailboxes even if it behaves a bit odd. I created a new mailbox called demo and db accounts show demo@ shows this
demo@=pseudonym
Access=public
Account=vmail+demo
Description=Created automatically for public folder demo

If I include the domain name is the response empty. I checked the other ones that were empty, in total I had four public mailboxes.
demo and catcher requires the format @
system and logger requires the format @subdomain.domain.tld.
maillist requires the format @domain.tld.

I installed a lot of updates at 14:30 on the 6th, could any of them cause have caused it?

Summary

Feb 06 14:27:23 Updated: glibc-common-2.17-322.el7_9.x86_64
Feb 06 14:27:42 Updated: glibc-2.17-322.el7_9.x86_64
Feb 06 14:27:49 Updated: systemd-libs-219-78.el7_9.3.x86_64
Feb 06 14:27:50 Updated: 4:perl-macros-5.16.3-299.el7_9.x86_64
Feb 06 14:29:21 Updated: 4:perl-libs-5.16.3-299.el7_9.x86_64
Feb 06 14:29:31 Updated: 4:perl-5.16.3-299.el7_9.x86_64
Feb 06 14:29:45 Updated: libsss_certmap-1.16.5-10.el7_9.7.x86_64
Feb 06 14:29:50 Updated: libsss_idmap-1.16.5-10.el7_9.7.x86_64
Feb 06 14:30:20 Updated: libuuid-2.23.2-65.el7_9.1.x86_64
Feb 06 14:30:27 Updated: libblkid-2.23.2-65.el7_9.1.x86_64
Feb 06 14:30:29 Updated: libmount-2.23.2-65.el7_9.1.x86_64
Feb 06 14:30:31 Updated: zlib-1.2.7-19.el7_9.x86_64
Feb 06 14:30:46 Updated: systemd-219-78.el7_9.3.x86_64
Feb 06 14:31:18 Installed: nethserver-base-3.8.0-1.ns7.noarch
Feb 06 14:31:40 Updated: nethserver-cockpit-lib-1.7.22-1.ns7.noarch
Feb 06 14:31:45 Updated: nethserver-backup-data-1.7.5-1.ns7.noarch
Feb 06 14:31:48 Updated: libsss_sudo-1.16.5-10.el7_9.7.x86_64
Feb 06 14:31:50 Updated: libsss_autofs-1.16.5-10.el7_9.7.x86_64
Feb 06 14:31:53 Updated: libsss_nss_idmap-1.16.5-10.el7_9.7.x86_64
Feb 06 14:31:58 Updated: sssd-client-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:02 Updated: sssd-common-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:20 Updated: sssd-krb5-common-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:23 Updated: sssd-common-pac-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:27 Updated: sssd-ad-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:30 Updated: sssd-ldap-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:44 Updated: sssd-krb5-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:49 Updated: sssd-proxy-1.16.5-10.el7_9.7.x86_64
Feb 06 14:32:59 Updated: kernel-tools-libs-3.10.0-1160.15.2.el7.x86_64
Feb 06 14:33:03 Updated: libsmartcols-2.23.2-65.el7_9.1.x86_64
Feb 06 14:33:13 Updated: util-linux-2.23.2-65.el7_9.1.x86_64
Feb 06 14:33:24 Updated: python-perf-3.10.0-1160.15.2.el7.x86_64
Feb 06 14:33:28 Updated: libipa_hbac-1.16.5-10.el7_9.7.x86_64
Feb 06 14:33:33 Updated: sssd-ipa-1.16.5-10.el7_9.7.x86_64
Feb 06 14:33:35 Updated: python-sssdconfig-1.16.5-10.el7_9.7.noarch
Feb 06 14:34:00 Updated: webtop5-1.4.12-1.ns7.noarch
Feb 06 14:39:05 Updated: linux-firmware-20200421-80.git78c0348.el7_9.noarch
Feb 06 14:41:53 Installed: kernel-3.10.0-1160.15.2.el7.x86_64
Feb 06 14:41:59 Updated: nethserver-webtop5-1.6.10-1.ns7.noarch
Feb 06 14:42:00 Updated: sssd-1.16.5-10.el7_9.7.x86_64
Feb 06 14:42:03 Updated: tuned-2.11.0-11.el7_9.noarch
Feb 06 14:42:56 Updated: kernel-tools-3.10.0-1160.15.2.el7.x86_64
Feb 06 14:43:01 Updated: nethserver-cockpit-1.7.22-1.ns7.noarch
Feb 06 14:43:06 Updated: systemd-sysv-219-78.el7_9.3.x86_64
Feb 06 14:43:09 Updated: 1:perl-Pod-Escapes-1.04-299.el7_9.noarch
Feb 06 14:43:27 Updated: libgudev1-219-78.el7_9.3.x86_64
Feb 06 14:43:38 Updated: iwl2000-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:43:40 Updated: iwl6050-firmware-41.28.5.1-80.el7_9.noarch
Feb 06 14:43:42 Updated: iwl135-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:43:48 Updated: iwl3945-firmware-15.32.2.9-80.el7_9.noarch
Feb 06 14:43:50 Updated: iwl2030-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:43:51 Updated: iwl105-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:43:56 Updated: iwl6000g2a-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:43:57 Updated: 1:iwl1000-firmware-39.31.5.1-80.el7_9.noarch
Feb 06 14:44:17 Updated: iwl7260-firmware-25.30.13.0-80.el7_9.noarch
Feb 06 14:44:19 Updated: iwl6000g2b-firmware-18.168.6.1-80.el7_9.noarch
Feb 06 14:44:21 Updated: iwl5000-firmware-8.83.5.1_1-80.el7_9.noarch
Feb 06 14:44:24 Updated: iwl4965-firmware-228.61.2.24-80.el7_9.noarch
Feb 06 14:45:44 Updated: iwl100-firmware-39.31.5.1-80.el7_9.noarch
Feb 06 14:45:51 Updated: iwl3160-firmware-25.30.13.0-80.el7_9.noarch
Feb 06 14:45:53 Updated: iwl6000-firmware-9.221.4.1-80.el7_9.noarch
Feb 06 14:45:54 Updated: iwl5150-firmware-8.24.2.2-80.el7_9.noarch
Feb 06 14:46:42 Erased: nethserver-letsencrypt-1.2.0-1.ns7.noarch

No, AFAIK. However you could try to see if there’s some clue that it is related to the updates in /var/log/maillog and /var/log/imap (considering also archived logs).

I see that a mail was successfully sent to system at 15:14:16 and at 00:00:14 the next day was the mailbox missing. I restarted the server after the update around 3pm. I have checked maillog, imap, messages and cron without finding anything that could explain it. In cron are these lines that I find a bit odd.
cron-20210207:Feb 6 18:22:15 “server” crontab[24324]: (root) BEGIN EDIT (root)
cron-20210207:Feb 6 18:22:21 “server” crontab[24324]: (root) END EDIT (root)
I couldn’t find any similar entries in any of the cron logs.

I think I just have to give up on this one. Can I just recreate the mailboxes without it causing any problems?

It seems the hostname field (“server”) is missing :thinking: There could be a mail delivery problem if the hostname is not set correctly, however I can’t figure out why the folders disappeared.

As we didn’t find the problem origin we can’t be sure it has been solved. Let’s try it and see how it goes…

That is only me that edited it, I replaced the actual hostname with “server” and missed one line that I have edited now.

1 Like

I created the maiboxes system and catcher but when I look at the aliases for them appears the same address twice for system. It shows the internal AD domain twice.

I added myself in the ACL with full control of the mailboxes but they don’t appear in Thunderbird nor Roundcube.

Can you give me some examples/UI screenshots?

Can you see the subdir with

find /var/lib/nethserver/vmail/vmail/Maildir/ -type d -name cur -printf "%h\n"

Screenshots can be a bit tricky without exposing my environment which I try to avoid.

/var/lib/nethserver/vmail/vmail/Maildir
/var/lib/nethserver/vmail/vmail/Maildir/.demo
/var/lib/nethserver/vmail/vmail/Maildir/.system
/var/lib/nethserver/vmail/vmail/Maildir/.catcher

I think I figured it out now. I found entries under Addresses that I removed and it looks OK now.

I don’t understand why I can’t see them in the mail client. I created the public mailboxes and for the ACL I entered my username with Full control as permission. I have restarted Thunderbird but they still don’t show up.

Are you sure they are subscribed?

1 Like

It was as easy as that, totally forgot about that step. Have a great weekend.

1 Like