SMTP SMTPS

2003-03-07 Thread alan.gerhard
James does not really support SMTPS does it ??

I mean, from what little I know of SMTPS, James would need
to be listening on that port (425?) as well as the one
defined for SMTP, right ??

... and from what I have seen in the code, that's not
happening.

Is this being looked at at all ??



___
thanks,
alan

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



RE: SMTP SMTPS

2003-03-07 Thread alan.gerhard
In a sense then, SMTPS is really running SMTP over SSL isn't
it ??
 
Didn't think to load multiple SMTP handlers - is there any
know caveat in doing this?? 
 
 James does support SMTP over SSL.  You can configure two
 SMTP handlers, although I haven't.  What James does not
 support is the STARTTLS command.  I know that Peter
 planned to work on that feature.
 
So to get James to support SMTPS, implementation of the
STARTTLS would be needed, and then some testing with
multiple SMTP handlers...
 
Thanks Noel!!

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



RE: User-Log

2003-03-04 Thread alan.gerhard
yes ..
modify the GenericMailet it'self where you would do your
init and log stuff there - review the thread; this was
suggested before, though don't recall if it was a viable
soluiotn... or a similar issue/topic

cheers!


 I have a problem,
 
 When I extends mailet with my new class
 GenericTracherMailet I must always modify the code of
 mailets (to call methods for init and do log) with the
 key-java-word :super. So I lose the advantage of keeping
 no modify mailets (go back start problem):-(
 
 any sugestions?
 
 -Pierre
 
 
 --
 --- 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]



Mailet API v3

2003-02-28 Thread alan.gerhard
Is there more documentation as to what is being considered
for this other then what I was able to find in the WIKI??
 
I am thinking about a control record ( fields ) - maybe part
of the Mailet interface - that could be used for tracking or
auditing purposes so it would be transparent to the user
class ..



___
thanks,
alan

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



RE: Mailet API v3

2003-02-28 Thread alan.gerhard
Thanks Noel -

I thought there was mention of this earlier but wasn't able
to find it.

Thanks,
Alan


 Alan,
 
 Jason Webb proposed an Stats Package for James last August
 , although the thread kind of died after some discussion.
 
 Here is the thread:

http://archives.apache.org/eyebrowse/ReadMsg?listId=20msgNo=4050
 
 Might be worth revisiting it, and incorporating JMX into
 the mix.
 
 --- Noel
 
 
 --
 --- 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]



something generates 19 mails

2003-02-28 Thread alan.gerhard
Java 1.3.1
James 2.1.2
W2K/SQL2K Server
Dell PowerEdge 1300 
 
19 mails are generated - consistently - when sending a mail
to a non-existent user at MyJamesDomain.Com from an existent
user at MyJamesDomain.Com; this is a similar issue I
reported to the user list with regards to the Error
Processor.
 
In a span of 6 seconds, 19 new mails are generated (valid
parsed connections, etc. ) as shown in my SMTPServer log.
This is when a web-based email client is used.
 
When Outlook 2000 is used, there are only 2 the get
consistently generated.
 
In my spoolmanager section (config.xml), I have defined 20
threads.
 
 
RemoteDelivery is attempted as per my Mailet log, almost at
the same time (time stamp is at the same second )...
 
Connection processing is also being done - 
on myDomain:25 from myDomain:3895 where this port is
sequentially incremented ...
 
There is an error in the way this is being processed;
finding out exactly where it is will be difficult and I
could use as many suggestions as possible to help me locate
the error.



___
thanks,
alan

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



RE: User-Log

2003-02-28 Thread alan.gerhard
 What is the current art in this area?  I haven't looked to
 see what qmail, sendmail, postfix, et al, do in terms of
 any common log format
 
It seems to be dependent upon the package; SendMail uses
levels - up to 20 and can log based on SMTP error codes I am
told.
 
Maybe the focus here would be on what the over user base
requires; day-to-day administration is one level,
administration trouble-shooting is at another, aduit-trail
at another, and so on.
 
Though the idea of using (a) standard log format(s) I like.
 
Another thing to thing about is to have a centralized point
from which logging would occur, independent from what
individual mailets do.



___
thanks,
alan

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



Re: Mailet API v3

2003-02-28 Thread alan.gerhard
  Jason Webb proposed an Stats Package for James last
  August , although the thread kind of died after some
  discussion. 
  Here is the thread:
 

http://archives.apache.org/eyebrowse/ReadMsg?listId=20msgNo=4050
  
  Might be worth revisiting it, and incorporating JMX into
  the mix.
 
I reviewed the message thread but it dealt more with stats
as in overall statistics. 
 
I am leaning more towards a status record attached - or a
part of - the Mailet interface; compare with an iDoc's
Control Rec.
 
But this too can be stretched to a more robust loging
mechanism.



___
thanks,
alan

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



RE: something generates 19 mails

2003-02-28 Thread alan.gerhard
 Since you said that these are in your domain, it should
 not be trying RemoteDelivery.

miss configuration - it seems i am not properly ghosting a
mail that is being processed by NotifySender.

as to details and setting debug on - it is and i have tons
of log files and even extractions for review. similar ones
were posted and when it becomes clear that i am no longer
misconfiguring James, we can review them.



___
thanks,
alan

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



Re: User-Log

2003-02-27 Thread alan.gerhard
Pierre -
No problem with the 'English' - just nice to hear from you.
 
The work you and Steve have done, could you describe for me
what the mailet actually does and how you are tracking a
mail from begining to end ?
 
Also, can you also describe - 
 
I initialise this service into every maillet(into the
method initialise() of the maillet) 
 
- this process too ??
 
Thanks,
Alan
 
 
 
 Hi,
 
 I try to create a service of User Logging (Keep all the
 path following by mails incoming in James).
 For the moment, I have create (with the help of Steve
 Short) a service Tracking that can : - Follow the
 evolution of a mail in the spoolmanager.
   - Log into a Database (can see
 result with Log5Factor).
 
 My question is : I initialise this service into every
 maillet(into the method initialise() of the maillet).
 Can I initialise only one time this service at start of
 James and only call this service in maillets (only one
 call)? If yes, Where?
 
 Have a nice day,
 
 -Pierre
 
 ps: Sorry for my english , I'm Belgian.
 
 
 --
 --- 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]



RE: User-Log

2003-02-27 Thread alan.gerhard

 It is not a mailet!
 
You see - I needed the explaination ...


 (after read explications)
 Now, I don't limit the log in one mailet(I use it in a lot
 of mailets use by the spoolmanager to follow the evolution
 of mails that arrive on the server).
 To do this, I must call :
 
 try {
 // Instantiate the a tracking service
 tracking = (Tracking)
 compMgr.lookup(org.apache.james.services.Tracking);
 } catch (ComponentException cnfe) {
 log(Failed to retrieve Tracking component: +
 cnfe.getMessage());
 } catch (Exception e) {
 log(Failed to retrieve Tracking component: +
 e.getMessage());
 }}
 
 in each init method of each mailet.
 So I search to not do that at each time(do only one time
 when James start). In this case, is it possible?

it might be - instead of placing this code in each init()
method, you could look at the GenericMailet.class and see if
it can't be leveraged there, similar to where the log() gets
implemented.



___
thanks,
alan

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



RE: User-Log

2003-02-27 Thread alan.gerhard
 In fact, I must add a method to Generic mailet(because all
 mailet extents this).Call for exemple LogUser. Is it that?

it appears to be, yes ...

  With that, can I also do the log into the service
 method(the code write in the Generic method is execute
 ,no?)?

yes, that's the direction I would take ...


 -Pierre

 -Message d'origine-
 De : [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Envoy=e9 : jeudi 27
f=e9vrier
 2003 16:17 =c0 : James Developers List
 Objet : RE: User-Log


 
  It is not a mailet!
 
 You see - I needed the explaination ...


  (after read explications)
  Now, I don't limit the log in one mailet(I use it in a
  lot of mailets use by the spoolmanager to follow the
  evolution of mails that arrive on the server).
  To do this, I must call :
 
  try {
  // Instantiate the a tracking service
  tracking =3d (Tracking)
  compMgr.lookup(org.apache.james.services.Tracking);
  } catch (ComponentException cnfe) {
  log(Failed to retrieve Tracking component:
  + cnfe.getMessage());
  } catch (Exception e) {
  log(Failed to retrieve Tracking component:
  + e.getMessage());
  }}
 
  in each init method of each mailet.
  So I search to not do that at each time(do only one time
  when James start). In this case, is it possible?

 it might be - instead of placing this code in each init()
 method, you could look at the GenericMailet.class and see
 if it can't be leveraged there, similar to where the log()
 gets implemented.



 ___
 thanks,
 alan

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

 __
 ___ Envie de discuter en live avec vos amis ?
 T=e9l=e9charger MSN Messenger
http://www.ifrance.com/_reloc/m
 la 1=e8re messagerie instantan=e9e de France


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




___
thanks,
alan

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



Re: Auto-detection of MX domains and MailetContext.isLocalServer()

2003-02-20 Thread alan.gerhard
The code snippet you posted, could be placed in a matcher as
opposed to part of the core – primarily because of
performance issues; nonethelsee, the questions you pose are
interesting; isLocalServer will definitely benefit by
matching a 'domain' to 'us', but does that mean that 'us'
handles the mail?? No, it doesn't; there is no implication
either that it should.

The existing method for determining local storage (
isLocalUser() ) is used for that and I see no need to
convolute this functionality.

One could redefine the meaning of isLocalServer to mean
quite simply that 'us' is contained within a mail's MX
record(s). The implication is 'Local Domain' as described
below. No need for complex definitions.

However, I think we might want to keep the ability to
perform MX lookups outside; this way we need not redefine
methods nor will we be hampered by excessive MX lookups when
all that is handled is a single domain/server. With this
scenario, the MX record to match ('us') would be variable. I
am uneasy with using getAttribute(Constants.HELLO_NAME) as
it appears to be restrictive.




 Consider the following code, which implements automatic
 detection of MX domains:

   Collection mxRecords =3d dns.findMXRecords(domain);
   if (mxRecords !=3d null  (mxRecords.contains(us))
   { ... we are responsible for this domain ...  }
   else { we are not responsible for this domain ... }

 One question is where to put such code.  We could add that
 to James.isLocalServer if the meaning of that method is
 that we are responsible for that domain, but not if it
 means that we are also responsible for that domain's
 storage.  The latter is checked by calling
 MailetContext.isLocalUser(), but we need to know when to
 bounce mail for whom the local user is simply invalid.

 So what does isLocalServer mean?  Does it mean that the
 mail repository is stored there?  Does it mean that
 relaying checks don't need to be made?  Do we need two
 methods?

  1 - Local Stores - mail will be stored locally

  2 - Local Domain - mail may or may not be stored locally,
 but we are a defined MX for that domain, and don't have to
 do relaying checks for mail going to it.

  3 - !Local Domain - we are being asked to relay mail for
 a domain that we don't handle.

 We need to clarify this point in order to more readily
 support complex configurations than just local storage or
 remote relaying.

 Another issue is what value to use for the parameter to
 mxRecords.contains(...).  We can't simply use
 InetAddress.getLocalHost().getHost().  I wouldn't mind
 keying off of
 getMailetContext().getAttribute(Constants.HELLO_NAME).

 --- Noel

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




RE: CIDR and InetNetwork Classes

2003-02-18 Thread alan.gerhard
 I don't understand what you meant by InetNetwork appears
 incomplete and geared to James v3.0.  

cannot compile in 1.3.x
missing James integration code
---

 I'm not sure what you feel is missing,
 so please elaborate.  Is it just validation?  

yes, just validation 


 I'm thinking that it might make sense to use Ant to handle
 JDK 1.3 vs JDK 1.4 the same way that Serge set it up to
 handle JDBC v2 vs JDBC v3.  A binary from us would be JDK
 1.3 compatible, but if the user builds from source it will
 optimize for what they have installed.

that's fine; i was unable to compile your test code without
the chages outlined below. unless we specify Java 1.4.x, we
need to supply code that is 1.3.x compatible.
this is a little different then thje JDBC issues ..






 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17
 , 2003 8:58 To: James Developers List
 Subject: CIDR and InetNetwork Classes
 
 Noel -
 
 Basic functional differences between the InetNetwork and
 CIDR classes can be simply summated as 'CIDR supports CIDR
 notation' and 'InetNetwork supports IP/MASK', and each
 class has their respective support/utility methods that
 offers the desired functionality ...
 
 The primary motivation behind CIDR was to offer James
 user's the ability to define sub-networks with CIDR
 notation; a standard practice among ISP's and other SMTP
 server administrators, and since InetNetwork now supports
 CIDR and '*' notation, CIDR has become superfluous.
 
 The performance difference between the two is noticeable;
 CIDR uses clumsy string mathematics for conversion to
 BigIntger while InetNetwork uses simpler bit wise
 operations on byte arrays. The result appears to be a much
 faster test operation with InetNetwork - and speed is
 crucial when validating mails in high volume flows.
 
 When we get down to implementation, it seems CIDR is ready
 - used in a commercial situation - while InetNetwork
 appears incomplete and geared to James v3.0. It is also
 incompatible with Java 1.3, the current platform that
 James is committed to.
 
 The bottom line is what's best for James and it's users we
 should do the following -
 
 [1]
 replace the following code
 
 return InetAddress.getByAddress(new byte[]
 {
 (byte) (mask[0]  ip[0]),
 (byte) (mask[1]  ip[1]),
 (byte) (mask[2]  ip[2]),
 (byte) (mask[3]  ip[3])
 });
 
 
 with
 return InetAddress.getByName (
 Integer.toString((mask[0]  ip[0])0
  0xFF, 10) + . +
 Integer.toString((mask[1]  ip[1])8
  0xFF, 10) + . +
 Integer.toString((mask[2]  ip[2])   16
  0xFF, 10) + . +
 Integer.toString((mask[3]  ip[3])   24
  0xFF, 10) );
 
 to get InetNetwork compatible with our current
 environment. Once we require 1.4, we can replace the code
 to use the 1.4 InetAddress.getByAddress(byte[]) method.
 Benchmarking with this change does not appear to slow down
 InetNetwork's performance enough to be a concern.
 
 [2]
 in normalizeFromCIDR, validation of the CIDR notation
 needs to be performed
 
 [3]
 Set up the GenericNetworkMatcher and it's associated
 matchers to use InetNetworks and get a version for review
 
 [4]
 Included this new InetNetwork class and associated
 matchers in the next scheduled release of James; which I
 believe is to be on a regular monthly schedule.
 
 
 James now has the ability to receive network
 specifications in the following formats -
 
 explicit address - 127.0.0.1
 address with a wildcard - 127.0.0*
 explicit name - myHost.com
 name with CIDR notation - myHost.com/24
 name with IP/MASK notation - myHost.com/255.255.255.0
 CIDR notation - 127.0.0.0/24
 IP/MASK notation - 127.0.0.1/255.255.255.0
 
 Collaboration, not competition, is the bond that
 strengthens our determination to go on.
 
 
 
 ___
 thanks,
 alan
 
 --
 --- 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]


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




CIDR and InetNetwork Classes

2003-02-17 Thread alan.gerhard
Noel -

Basic functional differences between the InetNetwork and
CIDR classes can be simply summated as 'CIDR supports CIDR
notation' 

and 'InetNetwork supports IP/MASK', and each class has their
respective support/utility methods that offers the desired 

functionality ...

The primary motivation behind CIDR was to offer James user's
the ability to define sub-networks with CIDR notation; a 

standard practice among ISP's and other SMTP server
administrators, and since InetNetwork now supports CIDR and
'*' 

notation, CIDR has become superfluous. 


The performance difference between the two is noticeable;
CIDR uses clumsy string mathematics for conversion to
BigIntger 

while InetNetwork uses simpler bit wise operations on byte
arrays. The result appears to be a much faster test
operation with 

InetNetwork - and speed is crucial when validating mails in
high volume flows.


When we get down to implementation, it seems CIDR is ready -
used in a commercial situation - while InetNetwork appears 

incomplete and geared to James v3.0. It is also incompatible
with Java 1.3, the current platform that James is committed
to.


The bottom line is what's best for James and it's users we
should do the following -

[1]
replace the following code

return InetAddress.getByAddress(new byte[]
{
(byte) (mask[0]  ip[0]),
(byte) (mask[1]  ip[1]),
(byte) (mask[2]  ip[2]),
(byte) (mask[3]  ip[3])
});


with


return InetAddress.getByName (
Integer.toString((mask[0]  ip[0])0 
0xFF, 10) + . +
Integer.toString((mask[1]  ip[1])8 
0xFF, 10) + . +
Integer.toString((mask[2]  ip[2])   16 
0xFF, 10) + . +
Integer.toString((mask[3]  ip[3])   24 
0xFF, 10) );



to get InetNetwork compatible with our current environment.
Once we require 1.4, we can replace the code to use the 1.4 

InetAddress.getByAddress(byte[]) method. Benchmarking with
this change does not appear to slow down InetNetwork's
performance enough to be a concern.

[2]
in normalizeFromCIDR, validation of the CIDR notation needs
to be performed

[3]
Set up the GenericNetworkMatcher and it's associated
matchers to use InetNetworks and get a version for review 

[4]
Included this new InetNetwork class and associated matchers
in the next scheduled release of James; which I believe is
to be 

on a regular monthly schedule.


James now has the ability to receive network specifications
in the following formats -

explicit address - 127.0.0.1
address with a wildcard - 127.0.0*
explicit name - myHost.com
name with CIDR notation - myHost.com/24
name with IP/MASK notation - myHost.com/255.255.255.0
CIDR notation - 127.0.0.0/24
IP/MASK notation - 127.0.0.1/255.255.255.0


Collaboration, not competition, is the bond that strengthens
our determination to go on.



___
thanks,
alan

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




CIDR Code Assesments

2003-02-15 Thread alan.gerhard
Thanks Noel for the review of the CIDR code that was
submitted
(http://www.mail-archive.com/james-dev@jakarta.apache.org/msg06695.html)
..
 
Your modifications are excellent - tighter and cleaner
code.
 
After spending a little more time with
live-testing, I have only found a problem with the
GeneriocNetworkMatcher:init(); the order in which the check
for localhost, explicit address, wildcard match was wrong.
The check for wildcard match needs to be before the explicit
address check.
 
I've made this correction and added a bit to the
documentation. 
 
Currently this code is in use at a commercial ISP and is
differentiating between ~200 distinct networks.
 
Please accept the attached Networks.Zip for inclusion in the
next regular release of James.
 
(when you guys get a chance to breathe of course!!)



___
Alan Gerhard
Gerhard Computing, Inc.
1-860-355-8610
1-860-355-9041
[EMAIL PROTECTED]



Network.zip
Description: Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [PATCH] RemoteDelivery with sendpartial config settings

2003-02-14 Thread alan.gerhard
this makes sense - with the segregation one would also try
to isolate the parameters that can get changed or modified
by SMTP server administrators in the normal course of
business.

one of the things that come to mind are -
port address
delay time-spans
modifications to the CIDR ranges

all of which are adjusted to either fine tune or restict
access.

when the con fig file needs to be modified often, if one
could isolate these 'user configurable's, we could minimize
the changes of corruption.

 - Original Message -
 Another alternate idea may be to have James expose
 configuration settings in 2 levels.
 
 - External configuration - config.xml
 and
 - Internal configuration - say config-defaults.xml. This
 is for advanced users. End users would not be expected to
 change this, but if they really do, then there is no need
 to recompile code. smtp* properties, authoritative tag in
 dns server(has generated a lot of traffic and should
 really not be changed), all hardcoded defaults could go in
 this.



___
thanks,
alan

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




RE: CIDr Addition

2003-02-10 Thread alan.gerhard
Noel -

 Thanks.  I did a little bit of cleanup work on it, 

okay - 
moved the matchNetworks() into the GenericAddressMatcher
class; cleaner and simplier, and can remove exposure to the
defined networks list/collection/array 

not sure though, with the change from Collection to
ArrayList; read a thread earlier about whether or not it's
implied order vs. explicit contract for order, but here
order is unnecessary...



___
thanks,
alan

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




RE: CIDr Addition

2003-02-10 Thread alan.gerhard
 I didn't change it from Collection to ArrayList, I changed
 it from Vector to ArrayList.  The interface is still
 Collection.  You don't need a synchronized class there. 
 The class is initialized in a single thread, and then the
 Collection is read-only, so there is no need to
 synchronize the operations.

hmm..
seems that a few of the earlier matchers used Collection. Is
this something we are slowingladjusting ??



___
thanks,
alan

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




RE: CIDr Addition

2003-02-10 Thread alan.gerhard
Noel, come on -

 Collection is an interface, not a class.  Your original
 code had:
 
   lstCIDR = new Vector();
 
 I just changed that to:
 
   lstCIDR = new ArrayList();
 
 that's it.  The instance variable is still defined as
 
   private Collection lstCIDR = null;



this is all i asked;

 Yes, other matchers probably do use Vector, and most can
 probably be changed.

as I modeled the code after existing code ...

excuse the inflection of terminology; a little dyslexic, but
mainly I am responding from memory - i cannot access this
from my nine to five for obvious reasons...

but thanks for pointing this out 



___
Alan Gerhard
Gerhard Computing, Inc.
1-860-355-8610
1-860-355-9041
[EMAIL PROTECTED]

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




CIDr Addition

2003-02-09 Thread alan.gerhard
Just read the Submit Patch post and understand that - have
winCVS and am gettting aquainted with it ...

I am adding two new classes and patching two others heavily.

The attached files are my contribution to James for the CIDR
process we spoke of earlier.

It compiles and runs - I will be testing this more later on
this afternoon, but in the meantime, I thought I would pass
them off for review.

I can diff the RemoteAddressInNetwork and
RemortAddressNotInNetwork and pass those in as patches, but
without the other two classes, they are meaningless.

Thanks for your time ...
Alan



- Message Forwarded on 2003-02-09 -
From: alan.gerhard [EMAIL PROTECTED]
To: James Users List [EMAIL PROTECTED]
Subject: RE: CIDR Notation
Date: Sun, 02 Feb 2003 03:00:52 -0500

Noel -

You are suggesting to create a
apache.mailet.GenericAddressMatcher abstract that folds most
of the 'common' code of the RemoteAddrInNetwork and
RemoteAddrNotInNetwork classes - similar to the
GenericRecipientMatcher abstract ..

Okay - I'll have a good at it;
see what I can come up with.



 Alan,

 I don't believe that you are missing something.  It isn't
 an oversight, just nothing that anyone got around to.
 When I first picked up the code, it didn't accept domain
 names, either.  I think I have some code for CIDR around
 here somewhere, but never finished adding it to those
 matchers.

 Actually, if you're going to do it, I suggest that you
 take those matchers, factor out most of the code into
 GenericAddressMatcher, and then subclass them for the
 specific behavior.  That'll make it easier to enhance them
 in the future.

 --- Noel

/*
 * Copyright (C) The Apache Software Foundation. All rights reserved.
 *
 * This software is published under the terms of the Apache Software License
 * version 1.1, a copy of which has been included with this distribution in
 * the LICENSE file.
 */
package org.apache.james.util;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.math.BigInteger;
import java.util.StringTokenizer;

/**
  *   RFC 1518, 1519 - Classless Inter-Domain Routing (CIDR)
  *   Known as 'Slash Notation' where an IP address range is described as
  *   IPADDRESS / SUBMASK =
  *   60.182.194.0/24 =
  *   a Class C =
  *   60.182.194.0 - 60.182.194.255
  *
  *   Simple class used to validate and check a given IP addresses against
  *   the allowed range as described above
  *
  *   As of 2003-02-08 System.out.println() needs to be either piped back to caller
  *   or switched with DEEP_DEBUG boolean; currently, with error, output is sent to 
the console
  *
  *   @author Alan Gerhard[EMAIL PROTECTED]
  *   @version This is $Revision: 5 $
  */

public class CIDR  {
/**
  *   Stirng constants based on the expected characters as defined for the CIDR 
Notation
  */
private String  SLASH = /;
private String  DOT = .;

/**
  * Method to check whether or not the given InetAddress object falls within
  * the sub-net as described by the given CIDR String.
  * @param pInetObj - an InetAddress object to be tesed
  * @paran pCIDR - a String representation of a CIDR subnet definition
  * @param pValidate - boolean specifying weather to validate the CIDR or not
  * @return ( addressInSubnet(pInetObj.getHostAddress(), pCIDR, pValidate) )
  */
public boolean addressInSubnet ( InetAddress pInetObj, String pCIDR, boolean 
pValidate ) {
return( addressInSubnet ( pInetObj.getHostAddress(), pCIDR, pValidate) );
}   //  EoM

/**
  * Method to check whether or not the given string IP Address ( 127.0.0.1 ) falls 
within
  * the sub-net as described by the given CIDR String.
  * @param pInetObj - a String representation of a valid IP address to be tesed
  * @paran pCIDR - a String representation of a CIDR subnet definition
  * @param pValidate - boolean specifying weather to validate the CIDR or not
  * @return true if pIPAddr is within the subnet as defined by pCIDR
  */
public boolean addressInSubnet ( String pIPAddr, String pCIDR, boolean pValidate  
) {
if (pValidate ) {
if ( !validCIDR(pCIDR) ) {
System.out.println(CIDR [ + pCIDR + ] is not valid);
return (false);
}
}

BigInteger theMask = new BigInteger ( mkBinaryMask(pCIDR),2 );

BigInteger testIPAddress = new BigInteger 
(mkBinaryAddress(pIPAddr).substring(0,mkBinaryMask(pCIDR).length()), 2 );

BigInteger theCIDR = new BigInteger (mkBinaryAddress(pCIDR.substring(0, 
pCIDR.indexOf(SLASH))).substring(0,mkBinaryMask(pCIDR).length()), 2 );

return (testIPAddress.and(theMask).equals(theCIDR));

}   //  EoM


/** validCIDR will check the given CIDR string aginst it's defined mask such that
  * the given IPAddress  MASK shall equal 0
  * BRexample:
  * BR  255.255.255.16/28 256.256.132.0/11
  * BR

[PATCH] xdocs

2003-02-09 Thread alan.gerhard
in documentation_2_1.xml, insert after line 51

lia href=dns_configuration_2_1.htmlDNS Server
Configuration/a/li

Also, add the attached to 
..\src\xdocs\dns_configuration_2_1.xml



___
thanks,
alan

?xml version=1.0?

document

 properties
  titleJames 2.1 - Configuring DNS Services/title
 /properties

body
section name=DNS Configuration

  
pDNS Transport services are controlled by a configuration block in the config.xml. This block
affects SMTP remote delivery./p

pThe dnsserver tag defines the boundaries of the configuration block. It encloses 
all the relevant configuration for the DNS server. The behavior of the DNS service is
controlled by the attributes and children of this tag./p 
pThe standard children of the dnsserver tag are:/p
ul
listrongservers/strong - This is a list of DNS Servers to be used by James and are 
specified by one, or more strongiserver/i/strong elements, which are child elements. 
Each server element is the IP address of a single DNS server.
plt;serversgt;/p
pnbsp;lt;servergt;127.0.0.1lt;/servergt;/p
pnbsp;lt;serverv166.181.194.205lt;/servergt;/p
plt;/serversgt;/p
/li

listrongauthoritative/strong - (strongtrue/false/strong)This tag specifies whether or not 
to require authoritative (non-cached) DNS records; to only accept DNS responses that are 
authoritative for the domain. It is primarily useful in an intranet/extranet environment.
pThis should always be strongfalse/strong unless you understand the implications. 
/li
/ul
/section
/body
/document

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


Possible Un-caught Exception in SMTPHandler

2003-02-08 Thread alan.gerhard
hi guys -

with reluctance, i am sharing the following exception with
you all as it appears to me that it could be a potential
problem ...
(James 2.1)

08/02/03 09:12:27 DEBUG smtpserver: Calling start()
08/02/03 09:12:27 DEBUG smtpserver: Watchdog default Worker
#44 has time to sleep 36
08/02/03 09:12:27 DEBUG smtpserver: Exception opening
socket: null
java.lang.NullPointerException
at
org.apache.james.smtpserver.SMTPHandler.readCommandLine(SMTPHandler.java:483)
at
org.apache.james.smtpserver.SMTPHandler.handleConnection(SMTPHandler.java:337)
at
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnection.java:404)
at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:47)
at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80)
08/02/03 09:12:27 DEBUG smtpserver: Calling
disposeWatchdog() default Worker #44
08/02/03 09:12:27 DEBUG smtpserver: Watchdog default Worker
#44 is exiting run().
08/02/03 09:12:27 DEBUG smtpserver: Returning SMTPHandler to
pool.



___
thanks,
alan

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




RE: Possible Un-caught Exception in SMTPHandler

2003-02-08 Thread alan.gerhard

 Why reluctant?  

the last time i saw a stack trace i immediately jumped up
and down waving my arms screaming bloddy murder - only to
discover later that the stack dump was in fact explicitly
piped to the log file - and this was after a demand for
action, etc. etc.

didn't wnat to do the same thing again :-)



___
thanks,
alan

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




Re: Logo competion..

2003-01-23 Thread alan.gerhard
not too sure about a new logo, but definately more
variations; was looking for the /Powered by JAMES/ logo, the
'smaller' logo, for example, to make it easier to place them
through various sites.


 Danny Angus wrote:
  I remember somewhere some suggestions for a new logo, I
  was thinking that perhaps we should have a competition.
  New name, new look kind of thing. 
  Thoughts?
 
 I like the current logo... someone here (Randy Stanard)
 actually  designed it, so I'm probably a bit biased.  He's
 been doing more open  source logos lately, like Apache
 Rivet (http://tcl.apache.org/rivet) and  now Apache TCL
 wants him to do one.  He also submitted a ton of logos 
 for the POI competition and finished in spots 2 through 6
 (split his own  vote :)
 
 Anyway, my 2 cents.
 
 -- 
 Serge Knystautas
 Lokitech
 Software - Strategy - Design
 http://www.lokitech.com



thanks,
alan

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




Re: [PATCH] Upgrade to DnsJava 1.3.1, add DNS Server autodetect, Make use of higher level api

2003-01-22 Thread alan.gerhard
 FWIW,
 the day, returning a list provides a degree
 of  compile-time checking for adherence to our required
 contract, returning  a Collection does not.  Sure, it
 would be better still to have checking  for the ordering
 criteria too, but the cost/benefit ratio of providing 
 this does not stack up. 
 Cheers
 
 ADK

nicely put ...

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




RE: Remote Delivery error

2003-01-17 Thread alan.gerhard
this is in reference to Serge's buffering changes, right ??
were they any other fixes made ??

alan


 Which version of James?  v2.1, or the current v2.1.1a2
 nightly?  I don't know if it would make any difference,
 but we just updated the JavaMail package included with
 James.  James uses JavaMail to do the delivery. 
 I'm going to post a v2.1.1a3 later today, fixing a bug in
 the SMTPHandler (incoming) in the current nightly build.
 
 Can you give me a valid address at the target server to
 which I can send a test message?
 
 --- Noel
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For
 additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




RE: Remote Delivery error

2003-01-17 Thread alan.gerhard
which bug in SMTPHAndler has been fixed ??

 Which version of James?  v2.1, or the current v2.1.1a2
 nightly?  I don't know if it would make any difference,
 but we just updated the JavaMail package included with
 James.  James uses JavaMail to do the delivery. 
 I'm going to post a v2.1.1a3 later today, fixing a bug in
 the SMTPHandler (incoming) in the current nightly build.
 
 Can you give me a valid address at the target server to
 which I can send a test message?
 
 --- Noel
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For
 additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




Re: New to the list..

2003-01-17 Thread alan.gerhard
Aaron -

 An actual field on the Mail interface is probably better
 suited to this  purpose than a mail attribute, as it would
 need to be a universally used  mechanism to be of real
 use.  I see mail attributes as being an  extensibility
 mechanism for use in situations where the attribute is not
 universally used.

this makes sense - keeping a flag/field  for this - but what
have you in mind for the mail attributes ??  although i
understand your reasoning, the attribute route might be the
better choice - afterall, we can mark an attribute as
manditory.

alan



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]



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




Re: missing mails

2003-01-17 Thread alan.gerhard
thanks serge -
i think i am back to where i was supposed to be.

alan


 alan.gerhard wrote:
  i can no longer publish to the james list.
  
  either you guys see what i am sending but i don't or my
  emails are not getting there.
  
  i am receiving only from mail.xx.com (JAMES) but
  sending to both JAMES and SENDMAIL so i really do not
  know what is happening.
  
  all very bizar as this is recent from about a week ago
  ... alan
  
  
  
  Alan Gerhard
  Gerhard Computing, Inc.
  [EMAIL PROTECTED]
 
 You need to subscribe to the list to send messages,
 otherwise they  require me to approve each message.
 
 I was on a trip the past few days and thought my approved
 emails were  going through, but our spam filter had caught
 them.  Your messages are  going through now.
 
 -- 
 Serge Knystautas
 Loki Technologies
 http://www.lokitech.com
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For
 additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




RE: Custom Mail Injection

2003-01-17 Thread alan.gerhard
understood -
it seemed to diverge but wasn't sure...
 

   Take a look a FetchPOP, but Leo D'angelo is about to
   contribute a massively enhanced version that uses
   JavaMail, and is capable of pulling e-mail from many
   message transports.  See the New to the list and
   Leo's new FetchMessage service (RE: New to the
 list..) threads. 
  i must have missed something in the discussion thread;
  there were comments made that pointed toward FetchPop3
  using the same mechinism as the rest of james
  (SMTPHandler) to allow common funcitonaluty, etc.
 
 Those are not contradictory statements.  Leo D'angelo's
 revised FetchPOP uses JavaMail to get messages, and then
 should be using the same mechanism as SMTPHandler to
 inject those messages into James' message processing. 
 --- Noel
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For
 additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




Re: pop3-file bug

2002-12-20 Thread alan.gerhard
my main reluctance in getting involved is the individualism
that seems to be rampant here - there are too many diverse
'versions' out there being used with the last stable release
being almost obsolete.

it is very simple - a plan was discussed and work was done
to get it out the door. once this task has been completed,
the next should be set up and work directed to complete that
and get it out the door.

it servers no purpose to postpone, branch, bicker, etc.
other then to undermine the project.

my main interest in james is to set up professional isps
that allow mailbox based spam and virus processing

until the next stable release is made, I am at a cross roads
as to continued development is hovering ….

let's just get the current release out and then go forward
for the next  one …


 I'm going to create a branch and stick the fix in there.
 When the  community is ready, they can choose to add it or
 not.
 --
 Serge Knystautas
 Loki Technologies - Unstoppable Websites
 http://www.lokitech.com


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



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]



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




RE: SQL DOWN; MAIL LOST?

2002-12-06 Thread alan.gerhard
Thanks Danny -

I understand you explaination - this is to be a behaviour of
the smpt handler and not necessarily a function of
configuration/mailets.

this is an important function - to properly notify the
sender of any problems in receiving the mail.

what i am not too sure of is the flow - in theory, James
receives mail and then processes it via the *Processor
Pipe*. one of the mailets is responsible for validating the
recipient (makes sure that the user exists) - if not, the
mail is processed accorindgly based on the configuration and
the appropreate error message should be returned to the
sennding server. my dilemma is that at this point the
sending server has already been be notified of sucess, the
mail in question has been passed off to James

i see potential a catch-22 situation here - which is a litle
bit different then the original problem i expereinced with
the db failing where the sender should have been notified.


thanks,
alan



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]



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




RE: FW: [important proposal] Cocoon as official Apache project

2002-10-30 Thread alan.gerhard
 James would be a fine top level project.  And it is really
 very independent of anything else, except for the hidden
 dependence upon Avalon. 
 --- Noel

which can be crippling at times. 
in going top-level, it must be very clear that all
dependencies are either removed or explicitly spelled out
with attention dedicated to ensuring those relationships are
whole.

without a clear distinction, james will always be a
subproject.

alan
--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

--
To unsubscribe, e-mail:   mailto:james-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:james-dev-help;jakarta.apache.org




Re: [VOTE] James as an official Apache project

2002-10-30 Thread alan.gerhard
my un-official vote is a +1 with following in mind …

The tlp issue is more about management than web-site and
mail addresses…

I firmly believe that James will benefit with the resources
a tlp brings …

alan
--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

--
To unsubscribe, e-mail:   mailto:james-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:james-dev-help;jakarta.apache.org




RE: [PATCH] SMTPHandler logging

2002-10-05 Thread alan.gerhard

My mistake -
Logging is a hot issue for me right now. The current logging
that's used in the James version we are running is rather
worthless to an ISP administrator - even to a Java
developer, these multiple log files are not very informative
nor consistant.

When the logging issue came up here in the list, I jumped in
as I wanted to be instrumental in both it's conceptual birth
as well as design and deployemnt.

The response I received was that , Yes, it's needed but not
now. so I backed off.

With this patch - which is really you adding some tracking
to an area you are monitoring - I got all huffy and thought,
Hey, what is this; we shouldn't be developing down this
dead end..

Has the code been frozen yet or are you still making these
mionor changes ?

Has the release date been set so one can start thinking
about the branch - or has that not been decided yet ?

and finially, who are the primary 'Committers' and which of
them are PMC's for James ??


Thank you,
Alan Gerhard

 We talked about making changes to mailet logging after the
 release.  I don't recall anything about not changing
 logging within James, which uses Avalon Logging Framework.
  Everyone seems relatively accepting of that logging
 mechanism within James, itself. 
 --- Noel
--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

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




RE: multidomain user

2002-10-03 Thread alan.gerhard

does this mean the James now supports virtual domains ??

 I just submitted the mailet that we use to manage a
 virtual user table. Supports wildcards and virtual hosts. 
 Zsombor Gegesy submitted a modification to the James
 repositories that uses fully qualified user@domain names
 in the repositories. 
 --- Noel



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]


--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

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




RE: Log level for Mailet Exceptions

2002-10-02 Thread alan.gerhard

... the logging of mailets should be an issue for mailet
developers, developers are free to use
commons logging or anything else in their mailets, as is
the case in the servlet API. 
d.

agreed to a point -
one log for mailets and a defined interface (api) to use to
log mailet activity. Although coders should be free to
implement whatever they want, a firm and concise framewrok
should be available.

alan



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]


--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

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




RE: Mailet Logging == Jakarta Commons (org.apache.commons.logging)

2002-10-01 Thread alan.gerhard

... We need a controllable and coordinated log of
information.
 --- Noel

agreed - but lets not loose site of the difference in
logfile configuration and the informatoin being logged; in a
sense, the log(String) vs. log(String, Exception) is not all
that irrelevant.

alan



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]


--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

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




Re: Log level for Mailet Exceptions

2002-10-01 Thread alan.gerhard

jumping in 

Just an observation; when programming for loggin
capibilities, the inital logger needs to be configurable
from the outside (config.xml) to allow the end user to turn
on/off different levels of logging.

That said and done, what needs to follow is a strict
adhesion to a way in which logging calls are made and what
information is ultimately pumped out..  with this in place,
some of the issues around loggin and waht's being pumped
out, will fall away leaveing the other more critial issues
as to how loggin is performaed and it's connectio to James
propper.

Is there a defined methodology of whne to make call to the
logger from within code ??

alan




 There are only two methods that integrate Mailet logging
 with James: 
 MailetContext.log(String);
 MailetContext.log(String, Throwable);
 
 At the moment, both of these log at the INFO level.  The
 problem is that if someone decides that they only want
 warnings and errors, then Mailet Exceptions are lost. 
 Unfortunately, the continued lack of proper log support in
 the Mailet API means that Mailet authors have no control
 over when log entries are recorded.
 
 Entries like ToProcessor: Sending mail
 org.apache.james.core.MailImpl@177115 to transport should
 arguably at DEBUG.  The RemoteDelivery mailet is
 especially verbose.  Some of the information is quite
 useful, other entries are not. 
 Currently we're stuck with this problem, so we have to
 pick a global compromise between verbosity and lose of
 critical information.  Until this problem can be fixed, at
 the least exceptions thrown by a mailet should be
 considered a warning, if not an error.  True, some of them
 aren't, but we're still stuck with a compromise, and
 better to assume that an exception is important than to
 discard it. 
 --- Noel
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For
 additional commands, e-mail:
 mailto:[EMAIL PROTECTED]



Alan Gerhard
Gerhard Computing, Inc.
[EMAIL PROTECTED]


--
   This EMail Was brought to you by
   WebMail
A Netwin Web Based EMail Client
  http://netwinsite.com/webmail/tag.htm

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