You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by YILMAZ GULERYUZ <yi...@yahoo.com> on 2002/06/08 18:00:31 UTC

Upgrade problem. Urgent help needed

Hi,
I have been using James Mail Server v1.2.1 for almost
6-7 months.
I decided to upgrade to v2.0a3. Installed everything
in safe.
The problem is; I couldnot import the old
mails&addresses from inboxes.

as a solution; I created all users one bye one, and
copied all mails to the folders.
But the mails are not recognised.

How can I import mailboxes&addresses safely?
Is there any change in file formats? I was using file
storage option.
Need your help.

Thanks.
YILMAZ G�LERY�Z


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Deleting mail problem after retrying.

Posted by David Kim <xm...@yahoo.ca>.
Hi all,

I am testing James 2.0a3. It's so nice.
But I have a problem. I don't want to write email in
'error' directory after retry.
I remember that somebody talked to me about setting
false instead of true in config.xml as follow.
But james write email into error directory still.


-- follow --
<!-- Processor CONFIGURATION SAMPLE: error is the
processor mails with
        failure conditions enter -->
<processor name="error">
<!-- Logs any messages to the repository specified 
-->
<mailet match="All" class="ToRepository">
      <repositoryPath>
file://var/mail/error/</repositoryPath>
      <!-- <repositoryPath>
db://conf/mail-error.properties </repositoryPath> -->
      <!-- follow, true:initial setting, false: I
changed but...             -->
      <passThrough> false </passThrough>
</mailet>
------------

Is there something wrong ? 
Please help me. 
Thank you.


David

______________________________________________________________________ 
Movies, Music, Sports, Games! http://entertainment.yahoo.ca

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Upgrade problem. Urgent help needed

Posted by Kobus Grobler <ko...@attix5.com>.
On Mon, 2002-06-10 at 17:36, Serge Knystautas wrote:
> Yes, this is a known problem with an underlying library we're using 
> (Avalon.cornerstone).  If you have a patch that corrects it, I'd love to 
> see it.
The hack (I would not call it a patch, since this does not really solves
james problems...): 


in avalon.(etc)masterstore.RepositoryManager

    public static final String getName()
    {
      //  return REPOSITORY_NAME + id++; (who knows why this was
supposed to work?!
        return REPOSITORY_NAME +1;
    }

And then to retrieve your orphaned mail, run this in very user
directory:

java SetRepositoryNum -num 1

/*
 * SetRepositoryNum.java
 *
 * Created on June 9, 2002, 5:32 PM
 */
import java.io.*;
/**
 *
 * @author  kobus
 */
public class SetRepositoryNum
{
    String dirStr = ".";
    int num;
    
    /** Creates a new instance of SetRepositoryNum */
    public SetRepositoryNum (String args[])
    {
        if (args.length < 2)
        {
            printUsage();
            return;
        }
        
        
        if (args[0].equals ("-num"))
        {
            num = Integer.parseInt (args[1]);
        }
        
        if (args.length == 4)
        {
            if (args[2].equals ("-dir"))
            {
                dirStr = args[3];
            }
            else
            {
                printUsage();
                return;
            }
        }
        
        System.out.println("Setting repository number to "+num+" for
repository dir "+dirStr);
        
        File dir = new File(dirStr);
        if (!dir.exists ())
        {
            System.out.println("Directory "+dirStr+" does not exist");
            System.exit (1);
        }
        
        File files[] =dir.listFiles ();
        int idxofn,idxoff;
        int objectStoreNum = num;
        String rnum;
        StringBuffer sbuf;
        for (int i = 0;i < files.length;i++)
        {
            if (files[i].getName ().endsWith ("StreamStore"))
            {
                sbuf = new StringBuffer(files[i].getName
());                
                idxofn = files[i].getName ().indexOf ("Repository") +10;
                idxoff = files[i].getName ().indexOf (".F",idxofn);
                sbuf.replace (idxofn,idxoff,Integer.toString (num));
                //rnum = files[i].getName ().substring (idxofn,idxoff);
                files[i].renameTo (new File(files[i].getParent
(),sbuf.toString ()));
                //System.out.println("rnum:"+sbuf);                
            }
            else if (files[i].getName ().endsWith ("ObjectStore"))
            {
                sbuf = new StringBuffer(files[i].getName
());                
                idxofn = files[i].getName ().indexOf ("Repository") +10;
                idxoff = files[i].getName ().indexOf (".F",idxofn);
                sbuf.replace (idxofn,idxoff,Integer.toString
(objectStoreNum));
                //rnum = files[i].getName ().substring (idxofn,idxoff);
                files[i].renameTo (new File(files[i].getParent
(),sbuf.toString ()));
            }
        }
    }

    void printUsage()
    {
        System.out.println("setrepository -dir maildir -num num");
    }
    /**
     * @param args the command line arguments
     */
    public static void main (String[] args)
    {
        new SetRepositoryNum(args);
    }
    
}



> 
> -- 
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com
> 
> 
> Kobus Grobler wrote:
> > I spent the whole of yesterday trying to fix exactly the same problem.
> > It seems that everytime you restart James, the file store implementation
> > of james starts a new repository. You will notice files like
> > xxxxx.RepositoryYY.FileStreamStore etc. in the mailboxes.
> > This means that if you restart james when their is still mail in the
> > your mailbox, it will be orphaned because this repository number
> > changes  :<.
> > 
> > My solution to the problem was a bit of a hack on the source code (in
> > the Avalon AbstractFileStore)to get it fixed.
> > But I guess it would be best if you send a mail to the james dev-team.
> > 
> > 
> > On Mon, 2002-06-10 at 10:34, YILMAZ GULERYUZ wrote:
> > 
> >>Yes. exactly.
> >>I copied var folder etc. 
> >>But when I try to retrieve mails from any of the
> >>accounts usin outlook etc, there seems to be no emails
> >>in the box. Also trying to retrieve emails using
> >>webmail program on the same server, again all inboxes
> >>seems to be empty.
> >>
> >>Is there any change with the file formats?
> >>
> >>thanks in advance
> >>yilmaz
> >>http://java.ankanet.com.tr
> >>
> >>
> >>--- mohan <mo...@yahoo.com> wrote:
> >>
> >>>Hi,
> >>>Did u try copying the "var" folder into the new
> >>>installation ? I feel it should work if you copy
> >>>that
> >>>as it contains all the user accoutnts, mailboxes,
> >>>spool, outbox etc.
> >>>Please revert back.
> >>>Mohan
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
Kobus Grobler
CSO
Attix5 Ltd
www.attix5.com
kobus@attix5.com
+27 21 880 2323 (Tel)
+27 21 880 2324 (Fax)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Upgrade problem. Urgent help needed

Posted by Serge Knystautas <se...@lokitech.com>.
Yes, this is a known problem with an underlying library we're using 
(Avalon.cornerstone).  If you have a patch that corrects it, I'd love to 
see it.

-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com


Kobus Grobler wrote:
> I spent the whole of yesterday trying to fix exactly the same problem.
> It seems that everytime you restart James, the file store implementation
> of james starts a new repository. You will notice files like
> xxxxx.RepositoryYY.FileStreamStore etc. in the mailboxes.
> This means that if you restart james when their is still mail in the
> your mailbox, it will be orphaned because this repository number
> changes  :<.
> 
> My solution to the problem was a bit of a hack on the source code (in
> the Avalon AbstractFileStore)to get it fixed.
> But I guess it would be best if you send a mail to the james dev-team.
> 
> 
> On Mon, 2002-06-10 at 10:34, YILMAZ GULERYUZ wrote:
> 
>>Yes. exactly.
>>I copied var folder etc. 
>>But when I try to retrieve mails from any of the
>>accounts usin outlook etc, there seems to be no emails
>>in the box. Also trying to retrieve emails using
>>webmail program on the same server, again all inboxes
>>seems to be empty.
>>
>>Is there any change with the file formats?
>>
>>thanks in advance
>>yilmaz
>>http://java.ankanet.com.tr
>>
>>
>>--- mohan <mo...@yahoo.com> wrote:
>>
>>>Hi,
>>>Did u try copying the "var" folder into the new
>>>installation ? I feel it should work if you copy
>>>that
>>>as it contains all the user accoutnts, mailboxes,
>>>spool, outbox etc.
>>>Please revert back.
>>>Mohan


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Upgrade problem. Urgent help needed

Posted by Kobus Grobler <ko...@attix5.com>.
I spent the whole of yesterday trying to fix exactly the same problem.
It seems that everytime you restart James, the file store implementation
of james starts a new repository. You will notice files like
xxxxx.RepositoryYY.FileStreamStore etc. in the mailboxes.
This means that if you restart james when their is still mail in the
your mailbox, it will be orphaned because this repository number
changes  :<.

My solution to the problem was a bit of a hack on the source code (in
the Avalon AbstractFileStore)to get it fixed.
But I guess it would be best if you send a mail to the james dev-team.


On Mon, 2002-06-10 at 10:34, YILMAZ GULERYUZ wrote:
> Yes. exactly.
> I copied var folder etc. 
> But when I try to retrieve mails from any of the
> accounts usin outlook etc, there seems to be no emails
> in the box. Also trying to retrieve emails using
> webmail program on the same server, again all inboxes
> seems to be empty.
> 
> Is there any change with the file formats?
> 
> thanks in advance
> yilmaz
> http://java.ankanet.com.tr
> 
> 
> --- mohan <mo...@yahoo.com> wrote:
> > Hi,
> > Did u try copying the "var" folder into the new
> > installation ? I feel it should work if you copy
> > that
> > as it contains all the user accoutnts, mailboxes,
> > spool, outbox etc.
> > Please revert back.
> > Mohan
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
Kobus Grobler
CSO
Attix5 Ltd
www.attix5.com
kobus@attix5.com
+27 21 880 2323 (Tel)
+27 21 880 2324 (Fax)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Upgrade problem. Urgent help needed

Posted by YILMAZ GULERYUZ <yi...@yahoo.com>.
Yes. exactly.
I copied var folder etc. 
But when I try to retrieve mails from any of the
accounts usin outlook etc, there seems to be no emails
in the box. Also trying to retrieve emails using
webmail program on the same server, again all inboxes
seems to be empty.

Is there any change with the file formats?

thanks in advance
yilmaz
http://java.ankanet.com.tr


--- mohan <mo...@yahoo.com> wrote:
> Hi,
> Did u try copying the "var" folder into the new
> installation ? I feel it should work if you copy
> that
> as it contains all the user accoutnts, mailboxes,
> spool, outbox etc.
> Please revert back.
> Mohan
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Upgrade problem. Urgent help needed

Posted by mohan <mo...@yahoo.com>.
Hi,
Did u try copying the "var" folder into the new
installation ? I feel it should work if you copy that
as it contains all the user accoutnts, mailboxes,
spool, outbox etc.
Please revert back.
Mohan


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>