Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[IMAP] Unable to remove a blank/empty email
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mariourk
l33t
l33t


Joined: 11 Jul 2003
Posts: 807
Location: Urk, Netherlands

PostPosted: Fri Feb 11, 2011 8:22 am    Post subject: [IMAP] Unable to remove a blank/empty email Reply with quote

I have a strange problem in one of my IMAP-mailboxes. There is a blank email sitting there. The email is 0KB and contains no data. No headers, no body, no dates, nothing.

The frustrating part is that it seems to be impossible to remove the email. Not with outlook, nor Evolution, nor webmail (Roundcubemail) Not even with Mutt.
I can't locate the file, representing this email, in ~/.maildir/cur. So I can't remove it the hard way either.

Is anyone familiar with this problem? Is there any way to fix it?

Currently using: net-mail/courier-imap-4.5.0

Thanks! :D
_________________
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sun Feb 13, 2011 7:41 pm    Post subject: Re: [IMAP] Unable to remove a blank/empty email Reply with quote

Its been a long time since I used maildirs in anger but no one else has responded.

What about a binary search for the broken message:

Create two temporary directories outside the maildir (say: good and unknown) and backup your mail to another (just in case you get lost as to what's happening and want to start again!)

Move half of the mail out to unknown
Has the bad mail gone?
If it has gone then the bad mail is in unknown - move the remaining mail from the maildir to good and move the unknown mail back into maildir
If it is still there then it is in the maildir - move the mail in unknown to good
Move another half of the mail out of maildir to unknown

Keep repeating the above and you will find it pretty quickly. You should end up with one mail in the maildir or one in unknown. If it is unknown then move it back to the maildir to prove it. Finally delete the broken mail.

If you have x messages then it will take at most (log2 x) attempts, so for 100 messages it will find it in at most 13 goes and you would have to be very, very unlucky to have to try that many times!

Incidentally you might like to move all the mail out first to prove that it is in there in the first place ...
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Feb 17, 2011 6:54 am    Post subject: Reply with quote

Code:

cd ~/.maildir
find . -type f -print0 |xargs -0 file |grep -i empty



give that a go.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum