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 Alexander Botov <al...@tumbleweed.com> on 2005/05/16 13:34:16 UTC

James database failure behaviour

Hi All,

I'm using James in test environment for custom email processing. I think
that the matcher/mailet framework gives tremendous amount of flexibility to
make custom message processing.

Shortly, this is what James does for me:
1. Messages are delivered to James by postfix
2. Virtual aliasing is done
3. Every message is placed in different processor depending on the
recipient.
4. Couple of mailets are fired in the processor. The last one collects
different attributes from the message and inserts them in database (Note
that I don't use James database repository for this).

Everything works perfectly fine, but I'm wondering what will be appropriate
action if there is a database failure which happens from time to time. I
would like James to stop processing messages, so they will stay in the
differed queue on the previous relay. Can I control this behavior? Can I
control rejecting of messages temporary until database is up (something like
"450 Try again later"). Correct me if there is different (or perhaps easier)
solution to this problem.

Thanks in advance

-- Alex


"Tumbleweed E-mail Firewall <tumbleweed.com>" made the following
 annotations on 05/16/05 04:40:30
------------------------------------------------------------------------------
This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed.  If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.
==============================================================================


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


Re: James database failure behaviour

Posted by Alexander Botov <al...@tumbleweed.com>.
----- Original Message ----- 
From: <ap...@bago.org>
To: "'James Users List'" <se...@james.apache.org>
Sent: Monday, May 16, 2005 3:54 PM
Subject: Re: James database failure behaviour

>
> I would use the RemoteDelivery method: put messages in a spool then run
> workers that handle the real delivery and retries.
>
> Just open the RemoteDelivery.java mailet and look how it works.
>
Thanks, I'll take a close look on this. This sounds more like implementing
local differed queue, which is good idea, but I would like to rely on
previous relay (postfix) for handling the unprocessed messages.

> Alternatively you can change the SMTPHandler to check your db connection
and
> reject when it is down.
>
That's what I started to dig on. The idea to check the db connection
availability is good, but I think that it not covers all database failure
problems (I run MSSQL 2000 box and sometimes it refuses to automatically
grow filegroups for unknown reason) I'm considering to signal somehow the
SMTPHandler to stop accepting connections through the db processing mailet
when catching SQLException. Do you think that this is possible?

> I would go with the first that is mailet-only based.
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

-- Alex


"Tumbleweed E-mail Firewall <tumbleweed.com>" made the following
 annotations on 05/16/05 09:08:41
------------------------------------------------------------------------------
This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed.  If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.
==============================================================================


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


Re: James database failure behaviour

Posted by ap...@bago.org.
> I would like James to stop processing messages, so they will 
> stay in the
> differed queue on the previous relay. Can I control this 
> behavior? Can I
> control rejecting of messages temporary until database is up 
> (something like
> "450 Try again later"). Correct me if there is different (or 
> perhaps easier)
> solution to this problem.

I would use the RemoteDelivery method: put messages in a spool then run
workers that handle the real delivery and retries.

Just open the RemoteDelivery.java mailet and look how it works.

Alternatively you can change the SMTPHandler to check your db connection and
reject when it is down.

I would go with the first that is mailet-only based.

Stefano


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