Hi Phil,

James is started with a spring context (see [1]).

You could start with your own class and launch there your watchdog thread (it can be opening a socket to the downstream mta).

Once the mta down event is generated, you could call stop() and also hook in the JamesServerApplicationContext to override the doClose method to take any action you would like.

More elaborated, you could also simply disable the SMTPServer leaving all the james operational. Once the downstream mta up event is detected by the internal watchdog, you could re-enable the SMTPServer by code.

Thx
Eric

[1] https://svn.apache.org/repos/asf/james/app/trunk/src/main/java/org/apache/james/app/spring/JamesAppSpringMain.java

On 05/08/2012 05:09 PM, Phil Spencer wrote:
I have a James Server instance that sits between two other MTAs and all is 
working very nicely

However I now need to take the James server offline if the downstream MTA is 
offline (the upstream server will then look for alternate means of delivery)

I could just create an external watchdog process but I wonder if there is a 
more elegant way of handling this with James itself

Any suggestions would be much appreciated

Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to