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 He...@icw.de on 2007/10/08 16:57:09 UTC

respooling

Hi,

I have a problem when respooling mails. In some more detail:
I am using james 2.3.1 and have written my own mailet. Sometimes it 
happens that
a mail cannot be delivered and it ends up in '/var/mail/error': e.g. 
because the
connection suddently went down, or because of some exception thrown in the
mailet, or ...

After removing the cause of the error I would like to deliver the mails 
and have 
tried to stop james, move all files from 'apps/james/var/mail/error' to
'apps/james/var/mail/error' and restart. However, the files where silently 
moved
into the error directory again and nothing happend.

Then I tried to make use of the 'FromRepository' mailet and included the
following snipplet into my 'config.xml':
      <processor name="root">
[...]
         <mailet match="All" class="FromRepository">
             <repositoryPath>file://var/mail/hdc/</repositoryPath>
             <processor>transport</processor>
             <delete>true</delete>
         </mailet>
Then I moved the content of 'error' into the new 'hdc' directory, but 
nothing
happend - the mails were not even moved into error again.

What did I do wrong?

TIA, Heinz-Dieter

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: respooling

Posted by Nitin Munjal <ni...@iitk.ac.in>.
Hi Noel
    Would you consider replying to my question too please?

Noel J. Bergman wrote:
>
> Did FromRepository get executed?  And I wouldn't do it with an all matcher.
> I use a bogus address, e.g., respool@, to initiate it.
>
> You should be able to turn on debugging and see what FromRepository tried to
> do.  I can look at it, if there are any fixes that need to be made, but in
> general, it has worked for me.
>
> 	--- Noel
>
>
>   
> Hi Noel
>    I have a doubt about James server. I plan to use James NNTP server 
> for my students server. I am using this because I want to add many 
> users at one go. I have written a java program that does telnet to 
> server and adds users.
>    All went fine upto the moment till I discovered that users cannot 
> delete their own message. I couldn't find a solution to this. Could 
> you please guide me how could that be done. If not possible, could you 
> suggest me some other free news server (which runs preferably on 
> windows), which has the capability to add many users from a file.
>
>    I shall be thankful to you. 

-- 
Nitin Munjal
4th year Undergraduate
Department of Computer Sciences and Engineering
IIT Kanpur 


Re: respooling

Posted by He...@icw.de.
> I noticed that in my James server (using file repositories) I need 
> to restart the server itself after the mail has been
> moved to the respool directory, and only after that the 
> FromRepository mailet will work (obviously a bug).
> 
> Is it also your case?
>

In my case, nothing happens. Regardless, if I restart james or not :-(

Heinz-Dieter

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: respooling

Posted by "Noel J. Bergman" <no...@devtech.com>.
> (using file repositories) I need to restart the server itself
> after the mail has been moved to the respool directory, and
> only after that the FromRepository mailet will work (obviously a bug).

I am not sure if I would call it a bug, so much as a "feature" of the file
based repositories.  They configure at init time, and that's it.  I will
take a look at some sort of reload mechanism, but I will have to go back and
start from the last release.

	--- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: respooling

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
I noticed that in my James server (using file repositories) I need to restart the server itself after the mail has been
moved to the respool directory, and only after that the FromRepository mailet will work (obviously a bug).

Is it also your case?

Vincenzo

Heinz-Dieter.Conradi@icw.de wrote:
> Hi Noel,
> 
>>> Then I tried to make use of the 'FromRepository' mailet and included 
> the
>>> following snipplet into my 'config.xml':
>> [...]
>>> Then I moved the content of 'error' into the new 'hdc' directory, but
>>> nothing happend - the mails were not even moved into error again.
>> Did FromRepository get executed?  And I wouldn't do it with an all 
> matcher.
>> I use a bogus address, e.g., respool@, to initiate it.
>>
>> You should be able to turn on debugging and see what FromRepository 
> tried to
>> do.  I can look at it, if there are any fixes that need to be made, but 
> in
>> general, it has worked for me.
> 
> Nothing in the debug log to be seen from the FromRepository except for 
> lines
> like:
> 
> 08/10/07 13:35:45 INFO  mailstore: added repository: 
> file://var/mail/hdc/MAIL->org.apache.james.mailrepository.AvalonMailRepository
> 08/10/07 13:35:45 INFO  spoolmanager: Mailet FromRepository instantiated.
> 
> And shouldn't it work just to move the error-files into spool?
> In that case I would guess that something more fundamental is wrong with 
> my
> configuration.
> 
> TIA, Heinz-Dieter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: respooling

Posted by He...@icw.de.
Hi Noel,

> > Then I tried to make use of the 'FromRepository' mailet and included 
the
> > following snipplet into my 'config.xml':
> [...]
> > Then I moved the content of 'error' into the new 'hdc' directory, but
> > nothing happend - the mails were not even moved into error again.
> 
> Did FromRepository get executed?  And I wouldn't do it with an all 
matcher.
> I use a bogus address, e.g., respool@, to initiate it.
> 
> You should be able to turn on debugging and see what FromRepository 
tried to
> do.  I can look at it, if there are any fixes that need to be made, but 
in
> general, it has worked for me.

Nothing in the debug log to be seen from the FromRepository except for 
lines
like:

08/10/07 13:35:45 INFO  mailstore: added repository: 
file://var/mail/hdc/MAIL->org.apache.james.mailrepository.AvalonMailRepository
08/10/07 13:35:45 INFO  spoolmanager: Mailet FromRepository instantiated.

And shouldn't it work just to move the error-files into spool?
In that case I would guess that something more fundamental is wrong with 
my
configuration.

TIA, Heinz-Dieter

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: respooling

Posted by He...@icw.de.
Hi Noel,

A second attempt with perhaps a bit more information.

"Noel J. Bergman" <no...@devtech.com> wrote on 08.10.2007 17:27:35:

> > Then I tried to make use of the 'FromRepository' mailet and included 
the
> > following snipplet into my 'config.xml':
> [...]
> > Then I moved the content of 'error' into the new 'hdc' directory, but
> > nothing happend - the mails were not even moved into error again.
> 
> Did FromRepository get executed?  And I wouldn't do it with an all 
matcher.
> I use a bogus address, e.g., respool@, to initiate it.
> 

No, the FromRepository does not get executed. As far as I can see, the
'service' method is never called, see below.

> You should be able to turn on debugging and see what FromRepository 
tried to
> do. 

I have turned everything in 'environment.xml' to "DEBUG", and nothing 
happend.
(Introducing a new category does not help here.)
I even set a new log statement into FromRepository.java, build and 
deployed
again - however, nothing to be seen. Then I converted every log into 
System.out.println and then at least my new log-statement in the init 
method
showed up, but not the one in the service method.

How, do I enable logging the proper way?

>      I can look at it, if there are any fixes that need to be made, but 
in
> general, it has worked for me.

I do not think that there is something wrong with the 
FromRepository-Mailet, 
but something with the configuration, so that the service method is not
even called.

To repeat, this is my configuration:

    <processor name="root">
           [...]
         <mailet match="All" class="FromRepository">
             <repositoryPath>file://var/mail/hdc/</repositoryPath>
             <processor>transport</processor>
             <delete>true</delete>
         </mailet>

(Playing with match="All" did not change anything.)
Is there anything wrong (I did not change the default transport 
configuration)?
Is is correct to just move the ...Repository.FileObjectStore and the 
...Repository.FileStreamStore into the 'hdc' Folder?
How is the service method triggered?

TIA, Heinz-Dieter

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: respooling

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Then I tried to make use of the 'FromRepository' mailet and included the
> following snipplet into my 'config.xml':

> Then I moved the content of 'error' into the new 'hdc' directory, but
> nothing happend - the mails were not even moved into error again.

Did FromRepository get executed?  And I wouldn't do it with an all matcher.
I use a bogus address, e.g., respool@, to initiate it.

You should be able to turn on debugging and see what FromRepository tried to
do.  I can look at it, if there are any fixes that need to be made, but in
general, it has worked for me.

	--- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org