james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rod Mackenzie <...@sorpen.demon.co.uk>
Subject Re: NullPointerException sending mail
Date Thu, 10 Jun 2004 20:49:10 GMT
Danny Angus wrote:

>>Any ideas on how to setup
>>James on a dialup?
> Allow your PC to dial out automatically.
> If this isn't practical there is no way James can cope well with
> intermittent connection.
> Two major issues are 1/your DNS lookup won't work and 2/ host will be
> unreachable
> James probably re-tries, but will possibly eventually give up.
I forgot add I'm using 2.2.0RC5 and have my RemoteDelivery mailet 
configured to use a gateway SMTP server. You're correct, the failure is 
a result of a failed DNS lookup, the code that caused the exception is 
trying to write a log message and assumes that the lookup worked. I've 
put in a small change to the RemoteDelivery mailet to try the next 
gateway if the lookup fails, this seems to work in that mail gets put 
onto the outgoing queue if no gateway can be found.
> I happily used James with ISDN dialing up when needed, and Demon's SMTP is
> aware that you're connected and fw's any mail which may have arrived while
> you were offline, so If you have unmetered access just let your pc dial
> out,
> if not you could switch james off when you are offline,
> if you want to write a mailet you could try writing one that stores
> outgoing mail and sends it at specific time of day.
That's my setup currently, an ISDM line, but it's only unmetered in the 
evenings and weekends so I'd prefer not to leave it connected all the 
time or have it dial automatically.

> There was a guy who asked a similar question for using James aboard ship,
> where satellite call charges had to be strictly controlled, I think he got
> a similar answer.
> If you do write a batch transport mailet let us know!
 > d.
A small change to the RemoteDelivery mailet seems to give me the desired 
effect so maybe I don't need another mailet, althougth I'm not sure if 
the change I've made  is  correct. I've included the change to 
RemoteDelivery.java below maybe one of the James developers could have a 
look at it.


diff -u -r1.33.4.21 RemoteDelivery.java
--- RemoteDelivery.java	2 May 2004 06:08:37 -0000
+++ RemoteDelivery.java	10 Jun 2004 20:43:52 -0000
@@ -406,6 +406,9 @@
              while ( targetServers.hasNext()) {
                  try {
                      HostAddress outgoingMailServer = (HostAddress) 
+                    if (outgoingMailServer == null) {
+                        continue;
+                    }
                      StringBuffer logMessageBuffer =
                          new StringBuffer(256)
                          .append("Attempting delivery of ")

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

View raw message