Stephano,

I got swamped and am just now able to get around to implementing the solution you proposed in response to my original question.

I understand all of the configuration stuff in assembly and config. But I'm confused on your statement about how to get messages into the alternate spool. It appears from what you are saying that the message goes onto the original spool, and when it's processed I need to have a matcher/mailet that recognizes a characteristic of the email and then moves it to the other spool. If that's the case, it won't really solve my problem. I need to totally bypass the original spool. If the original spool is getting clogged up, then my notification message will be stuck in the traffic and won't get moved to the 2nd spool until it works its way up in the original queue which defeats the original intent.

I was figuring I could put in a 2nd smtp processor on a different port and have it drop messages directly into the 2nd spool completely bypassing the original spool. But I can't find any configuration that tells the smtp server which spool to drop messages on. Is there a way to configure this? Or am I completely misunderstanding your solution, and it does indeed bypass the original spool completely?

Thanks.

Jerry

Stefano Bagnara wrote:
In James 2.3.0 you can "easily" configure 2 spoolmanagers.

Open your assembly.xml and clone the spoolmanager and spoolrepository, e.g:

<block name="spoolrepository2" class="org.apache.james.mailrepository.MailStoreSpoolRepository" >
    <provide name="mailstore"
             role="org.apache.avalon.cornerstone.services.store.Store" />
</block>

<block name="spoolmanager2" class="org.apache.james.transport.JamesSpoolManager" > <provide name="spoolrepository2" role="org.apache.james.services.SpoolRepository"/> <provide name="matcherpackages" role="org.apache.james.services.MatcherLoader"/> <provide name="mailetpackages" role="org.apache.james.services.MailetLoader"/>
</block>

Then in your config.xml:

<spoolrepository2 destinationURL="file://var/mail/spool2/" type="SPOOL"/>

and

<spoolmanager2>
  <threads> ....
  <processor...>
    <mailet..
   ....
</spoolmanager2>


Then you make sure to write messages to the spoolrepository2 using the ToRepository mailet or using something similar in your code. Make sure the messages you wrote in the spool have a STATE present in the processors of the spoolmanager2. You will also have to add the error processor.

Stefano

Jerry M ha scritto:
I have had some situations recently where the spool queue has gotten clogged and has grown to ~4000 messages. I'm still trying to track down what is happening and what might be causing it. I can recycle mySQL and James and the spool starts clearing out.

I'm sure I'll ultimately figure out what is happening. But in the meantime, I don't want it to back up for 8-10 hours with no mail going in/out until one of my clients calls and complains and lets me know it's doing it again.

I've written a monitor app that wakes up every five minutes and looks at the size of the queue. If the queue ever goes over a threshold, the app sends a text message email to my cell phone.

However, there is an obvious problem with this solution... if the spool queue is backed up, the text message email to my cell phone will be backed up right along with everything else. I could use another smtp server someplace (non-trivial to find some 3rd party smtp that will let me use it). Or I could set up a second James smtp server that is only used by the monitor. However, all the servers in one instance of James all use the same spool queue, right? So I would literally have to install James twice, each as its own service, with two different config files and two different data stores and different ports for the servers, right?

I figure I can do this. But I would like a sanity check on this. Again, all I want to do is to have a 2nd (private) spool queue with another smtp server on a private port that can get a message out of the primary spool is clogged. Is what I described the best way to do this?

Thanks.

Jerry



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to