Subject: | might lose data delivering to maildir |
Date: | Tue, 6 Jun 2006 09:14:09 -0400 |
To: | bug-email-localdelivery [...] rt.cpan.org |
From: | Ricardo SIGNES <rjbs [...] cpan.org> |
(This is an RT-ified version of an email sent to Casey in February of 2006.)
There exists a bug in Email::LocalDelivery::Maildir that could lead to the loss
of mail.
The situation is as follows:
If there is enough inode space in a filesystem to create new links, but not
enough to write new bytes of data, the code will return that it delivered,
because it only checks the status of linking operations.
This is especially insidious because it will not fail 100% of the time on a
full device; it will report success if there is room for new a new link in the
local path, and failure if there is not.
I have attached two patches. The first returns false from write_message if the
new file cannot be printed to. The second does that, but also returns false if
the new file is not at least as large as the message delivered to it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.