james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Verelst <johan...@verelst.net>
Subject LocalUsers inconsistancy?
Date Tue, 19 Feb 2002 12:26:49 GMT

I have installed and successfully runned James 2.0a2, and also written my
own UsersRepository and MessageRepository. Everything finally works
(although I have to put my own classes in the james.bar file, the
classloader refuses them otherwise). Only problem I have now is that the
'LocalUsers' part is quite inconsistant. Let me elaborate with an example:

- A message arrives with 'RCPT TO: <Admin@localhost>'
- James instantly accepts this mail, without checking if the user actually
  exists and/or the domain is being accepted for (rcpt <blaat@baearfed>
  also gives an '250 OK'
- James searches the username CASE-INSENSITIVE:
  Tue Feb 19 13:11:52 CET 2002 [DEBUG  ] (users-store): containsCaseInsensitive() called with
- James tries to find the username CASE-SENSITIVE:
  Tue Feb 19 13:11:52 CET 2002 [DEBUG  ] (users-store): getRealName() called with user:Admin
- James tries to find a user-object CASE-SENSITIVE:
  Tue Feb 19 13:11:52 CET 2002 [DEBUG  ] (users-store): getUserByName() called with user:Admin
- Unfortunately, the user 'Admin' does not exist, 'admin' does, message
  delivery fails ...

I think the following comment in 'getRealName()' is causing this
     * Returns the user name of the user matching name on an equalsIgnoreCase
     * basis. Returns null if no match.

Am I correct in assuming that:
- James distinguishes between usernames (part before the '@' in the mail)
  and accounts (physical things that receive mail)
- James first tries to find out if the username is correct (case
  insensitive), then tries to find the account for the username
- James then calls 'getUser()' with this account (this part IS
  CASE-SENSITIVE) to get an object that is used for storage etc.

This might seem a silly question to you, but because of the lack of
documentation (there are no design documents online, and the javadocs are
very limited) I am not very certain about the 'flow' of information.

Furthermore, I wonder why ALL receipients (yes, I've disabled relaying for
even localhost) are allowed during the 'RCPT TO:'. There is no call to my
self-made UserStore, meaning that all mail is instantly accepted and only
checked during a later stage. This means that in the case of SPAM, all
mail is directly accepted and stored, bounce messages are generated, and a
lot of overhead with it.

It could just be my unfamiliarity with the SMTP protocol and RFC's (maybe
bouncing during RCPT stage is not even allowed), but it would be nice if
it can be implemented.

If, by the way, anybody is interested in my classes, I might make them
publically available. They allow storage of users and mails in the
'MMBase' Content-Management system. Although it is not yet decided if this
connector will be made publically available (due to the fact that the
company I make it for does not have time/means to properly support it), I
have good hope that it will (probably under a Mozilla-style license).

Kind regards,

Johannes Verelst
Johannes Verelst		| Gullie on SlashNET (nl.eu.slashnet.org)
johannes@verelst.net		| www.verelst.net
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

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

View raw message