imap Error: rename failed: Too many links
Greetings, All!
I'm facing a problem with one particular directory in a mailbox. The exact error line is:
Apr 7 12:00:21 mxs dovecot: imap(vera): Error: rename(/home/vera/.mail/INBOX/Майя Николаевна/new/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST, /home/vera/.mail/INBOX/Майя Николаевна/cur/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST) failed: Too many links
The rest of the mailbox behave correctly, as I can tell, but this specific subdir fails to report unread mail correctly. What are the options to fix it?
# dovecot --version 2.2.22 (fe789d2)
Config is in attachment, but I doubt it is of any interest.
-- With best regards, Andrey Repin Friday, April 7, 2023 16:37:09
Sorry for my terrible english...
Greetings, All!
I'm facing a problem with one particular directory in a mailbox. The exact error line is:
Apr 7 12:00:21 mxs dovecot: imap(vera): Error: rename(/home/vera/.mail/INBOX/Майя Николаевна/new/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST, /home/vera/.mail/INBOX/Майя Николаевна/cur/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST) failed: Too many links
The rest of the mailbox behave correctly, as I can tell, but this specific subdir fails to report unread mail correctly. What are the options to fix it?
# dovecot --version 2.2.22 (fe789d2)
Config is in attachment, but I doubt it is of any interest.
Anybody?
-- With best regards, Andrey Repin Saturday, April 15, 2023 22:54:39
Sorry for my terrible english...
Andrey Repin wrote:
Apr 7 12:00:21 mxs dovecot: imap(vera): Error: rename(/home/vera/.mail/INBOX/Майя Николаевна/new/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST, /home/vera/.mail/INBOX/Майя Николаевна/cur/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST) failed: Too many links
Looks like dovecot is trying to move the file from 'new' to 'cur' and failing.
'new' is where it puts new messages until something reads them and then they get moved to 'cur'.
What filesystem / OS is it?
It seems to point to some problem with the underlying filesystem reaching some maximum number of subdirectories or hard links, e.g.:
https://www.nexcess.net/blog/mkdir-too-many-links-what-it-is-and-how-to-fix/
It is interesting that you use maildir but with LAYOUT=fs
Also look at:
https://doc.dovecot.org/admin_manual/namespaces/ - as there are some limits mentioned.
https://doc.dovecot.org/configuration_manual/mail_location/Maildir
R.
Ugh. I used Dovecot's mailman3 web UI to send this reply. That didn't go well because DMARC, and it appears mailman didn't change the From: headers.
Trying again.
R.
17 Apr 2023 02:25:13 robl@lentil.org:
Andrey Repin wrote:
Apr 7 12:00:21 mxs dovecot: imap(vera): Error: rename(/home/vera/.mail/INBOX/Майя Николаевна/new/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST, /home/vera/.mail/INBOX/Майя Николаевна/cur/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST) failed: Too many links
Looks like dovecot is trying to move the file from 'new' to 'cur' and failing.
'new' is where it puts new messages until something reads them and then they get moved to 'cur'.
What filesystem / OS is it?
It seems to point to some problem with the underlying filesystem reaching some maximum number of subdirectories or hard links, e.g.:
https://www.nexcess.net/blog/mkdir-too-many-links-what-it-is-and-how-to-fix/
It is interesting that you use maildir but with LAYOUT=fs
Also look at:
https://doc.dovecot.org/admin_manual/namespaces/ - as there are some limits mentioned.
https://doc.dovecot.org/configuration_manual/mail_location/Maildir
R.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Robert Lister skrev den 2023-04-17 11:37:
Ugh. I used Dovecot's mailman3 web UI to send this reply. That didn't go well because DMARC, and it appears mailman didn't change the From: headers.
Trying again.
X-Spam-Status: No, score=-7.9 required=5.0 tests=ARC_SIGNED,ARC_VALID, AUTHRES_DKIM_PASS,AUTHRES_DMARC_PASS,AUTHRES_SPF_PASS,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,RELAYCOUNTRY_GREY,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0-r1906050
i see no problem
hope none will reject dkim invalid maillist
Benny Pedersen skrev den 2023-04-17 12:05:
Robert Lister skrev den 2023-04-17 11:37:
Ugh. I used Dovecot's mailman3 web UI to send this reply. That didn't go well because DMARC, and it appears mailman didn't change the From: headers.
Trying again.
X-Spam-Status: No, score=-7.9 required=5.0 tests=ARC_SIGNED,ARC_VALID, AUTHRES_DKIM_PASS,AUTHRES_DMARC_PASS,AUTHRES_SPF_PASS,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,RELAYCOUNTRY_GREY,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0-r1906050
i see no problem
hope none will reject dkim invalid maillist
X-Spam-Status: No, score=-8.4 required=5.0 tests=ARC_SIGNED,ARC_VALID, AUTHRES_ARC_PASS,AUTHRES_DKIM_PASS,AUTHRES_DMARC_PASS, AUTHRES_IPREV_PASS,AUTHRES_SPF_PASS,AWL,DKIM_ADSP_DISCARD,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, RELAYCOUNTRY_GREY,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=4.0.0-r1906050
last is my own posting results in return
Greetings, robl@lentil.org!
Andrey Repin wrote:
Apr 7 12:00:21 mxs dovecot: imap(vera): Error: rename(/home/vera/.mail/INBOX/Майя Николаевна/new/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST, /home/vera/.mail/INBOX/Майя Николаевна/cur/1678353168.M710968P25673.mxs.ads.ccenter.lan,S=5442,W=5513:2,ST) failed: Too many links
Looks like dovecot is trying to move the file from 'new' to 'cur' and failing.
'new' is where it puts new messages until something reads them and then they get moved to 'cur'.
What filesystem / OS is it?
Ubuntu 18.04 in an LXC container. The underlying storage is a BTRFS subvolume. (Thus the idea that there's not enough directory resources seems implausible, but…)
It seems to point to some problem with the underlying filesystem reaching some maximum number of subdirectories or hard links, e.g.:
https://www.nexcess.net/blog/mkdir-too-many-links-what-it-is-and-how-to-fix/
It is interesting that you use maildir but with LAYOUT=fs
No, it really not THAT interesting, as it allows for readable directory structure rather than some UTF-7-encoded garbage.
Also look at:
https://doc.dovecot.org/admin_manual/namespaces/ - as there are some limits mentioned.
https://doc.dovecot.org/configuration_manual/mail_location/Maildir
…your reply, and an additional off-list mail of one other list participant, led me to attempt to trigger a maintenance check (dedupe+compact) of the directory in question from the mail client.
It resulted in a success, removing a number of duplicated messages and cleaning up stale deleted entries.
As a precaution, I asked the owner to run a full mailbox maintenance in their free time. After that was done, I noticed another directory with similar symptoms by additional two error lines in the log, but they never reoccurred.
I no longer see the overwhelming spam of these messages in the logs, so I tentatively consider the issue resolved for the time being.
-- With best regards, Andrey Repin Tuesday, April 18, 2023 20:14:37
Sorry for my terrible english...
participants (4)
-
Andrey Repin
-
Benny Pedersen
-
Robert Lister
-
robl@lentil.org