Inconsistent imap-folder after timedout operation

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Jan Reusig

Inconsistent imap-folder after timedout operation

Postby Jan Reusig » Wed Feb 14, 2007 8:16 am

hello board,

after I tried to move some thousand mails from "Sent items" to somewhere else with Thunderbird, the following error keeps constantly occuring:

32.092038 192.168.0.121 -> 192.168.0.170 IMAP Request: 7 select "Sent Items"
32.326316 192.168.0.170 -> 192.168.0.121 IMAP Response: * 2063 EXISTS
32.390483 192.168.0.121 -> 192.168.0.170 IMAP Request: 8 getacl "Sent Items"
32.401116 192.168.0.170 -> 192.168.0.121 IMAP Response: * ACL "Sent Items" anyone ""
32.504519 192.168.0.121 -> 192.168.0.170 IMAP Request: 9 myrights "Sent Items"
32.506139 192.168.0.170 -> 192.168.0.121 IMAP Response: * MYRIGHTS "Sent Items" rscwidal3
32.602982 192.168.0.121 -> 192.168.0.170 IMAP Request: 10 UID fetch 1:* (FLAGS)
32.855190 192.168.0.170 -> 192.168.0.121 IMAP Response: 10 NO some of the requested messages no longer exist
35.378031 192.168.0.121 -> 192.168.0.170 IMAP Request: 11 IDLE
35.379427 192.168.0.170 -> 192.168.0.121 IMAP Response: + idling
37.636914 192.168.0.121 -> 192.168.0.170 IMAP Request: DONE

and Thunderbird gives me an errror dialog. Unfortunately, I wasn't able to get rid of it. I can't delete and recreate the folder. Outlook however works and shows the about 100 messages, that are really in the folder.
"omscan -Axva" gives no errors.

I'd be grateful for any hint...
Your's j.

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Wed Feb 14, 2007 3:56 pm

This sounds like a problem with the imap folder cache on the server. To resolve this:
  1. Find the user's mailbox directory using

    Code: Select all

    omshowu -n "User Name" -f
    This will give the 'g' directory.
  2. In that directory is a folder called imap-cache. Make sure that the user is signed out and there are no IMAP processes running for that user (use omstat -u imap to see this).
  3. Delete the contents of the imap-cache directory but don't delete the directory itself.


Cheers

Dave

Jan Reusig

it works :)

Postby Jan Reusig » Wed Feb 14, 2007 4:08 pm

wow, it's done! Thank you a lot!

seamusabshere

thunderbird error message is also fixed by this

Postby seamusabshere » Wed Mar 07, 2007 3:29 pm

this worked for me when i got the the message

some of the requested messages no longer exist

in thunderbird (or probably any other imap client)

foxyguitarman
Posts: 26
Joined: Thu Sep 13, 2007 3:08 pm

Postby foxyguitarman » Fri Nov 02, 2007 7:52 pm

This also worked for me!

sla
Posts: 29
Joined: Tue May 27, 2008 6:06 am
Location: Moenchengladbach, Germany

Postby sla » Thu Jun 05, 2008 5:36 am

I had to use this procedure three times this week to fix errors where users were unable to log into their accounts via swa. I'm still trying to find a pattern in the occurrence of the error. It could be related to users trying multiple concurrent logins.

Anyway - to make things easier for me and my coworkers, I have created this little shell-script to delete the imap cache:

(Comments and improvements welcome - use at your own risk)

Code: Select all

#!/bin/bash

if [ "x$1" = 'x' ]
then
  echo "$0 no Username given - try $0 'Username'"
  exit
fi

OMSTAT=/opt/scalix/bin/omstat
OMSHOWU=/opt/scalix/bin/omshowu
BASEDIR=/var/opt/scalix/s1/s
USERNAME=$1
USERFOLDER=`$OMSHOWU -n "$USERNAME" -f 2> /dev/null | grep "User Folder" | cut -d ":" -f 2 | cut -f 1-3 -d "/"`

if [ "x$USERFOLDER" = "x" ]
then
  echo "Error: User $USERNAME not found"
  exit 1
else
  IMAPCACHEDIR=`echo $USERFOLDER | sed "s|~|$BASEDIR|"`/imap-cache
  echo "User $USERNAME found. Directory: $IMAPCACHEDIR"
  if [ ! -d $IMAPCACHEDIR ]
  then
    echo "Error: Directory $IMAPCACHEDIR not found"
    exit 3
  fi
fi

echo -n "Stopping existing imap-processes ..."
$OMSTAT -u imap | grep "$USERNAME" | cut -c 65-69 | xargs -r kill
sleep 1
echo " [OK]"

echo -n "Deleting IMAP-Cache ..."
sleep 1
rm -f $IMAPCACHEDIR/*
echo " [OK]"


--
sven

Deezt
Posts: 20
Joined: Wed Jul 16, 2008 7:47 am
Location: Germany

Postby Deezt » Thu Jul 31, 2008 9:59 am

Not trying to bump really old threads but thank you sla! Your script seems like a much nicer way to deal with these random problems.

sla
Posts: 29
Joined: Tue May 27, 2008 6:06 am
Location: Moenchengladbach, Germany

Postby sla » Thu Jul 31, 2008 2:39 pm

Deezt wrote:Not trying to bump really old threads but thank you sla! Your script seems like a much nicer way to deal with these random problems.


There is a much better version in the wiki

http://www.scalix.com/wiki/index.php?title=HowTos/AdminScripts#reset_the_imap-cache_for_a_mailbox

You should use the wiki-Version as it also locks the mailbox before doing operations on it.

--
sven


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 2 guests

cron