Thanks Stephan. I'll go patch right now.
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Stephan Schiessling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 20, 2001 10:47 AM
Subject: RemoteDelivery Thread may hang forever
>
> Sometimes james denies to proceed with sending email to remote
> mail servers.
>
> I debugged this problem. It hangs in transport.connect() in
> RemoteDelivery.java, so it hangs inside JavaMail. The reason is,
> that the Socket has no timeout set.
>
> Fortunately, JavaMail allows us to set such timeout, and therefore
> a fix in james is possible in the following way:
>
> If Session is created, a property "mail.smtp.timeout" should be set.
> (If SMTP is used).
>
> In RemoteDelivery.java, run() method,
>
> public void run() {
> //Checks the pool and delivers a mail message
> Properties props = new Properties();
> String timeout = getInitParameter("timeout");
> log("timeout="+timeout);
> if (timeout == null) timeout = "600000";
> props.put("mail.smtp.timeout", timeout);
> Session session = Session.getInstance(props, null);
> ...
>
>
> Then RemoteDelivery has a new parameter to set the timeout. Example:
>
> <mailet match="All" class="RemoteDelivery">
> <outgoing> file://../var/mail/outgoing/ </outgoing>
> <delayTime> 60000 </delayTime>
> <maxRetries> 288 </maxRetries>
> <timeout> 300000 </timeout>
> </mailet>
>
>
> This could be improved to support more protocols, but for that
> it is preferable to improve the API to get parameters.
>
> Bye,
>
> Stephan Schiessling
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> 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]