Re: Re: [Jamm-devel] Cleaner broke domain in LDAP

"Keith T. Garner" <[email protected]>
Newsgroups gmane.mail.jamm.user
Message-ID <[email protected]>
On Sun, May 02, 2004 at 12:04:08, Fredrik Wendt said:
> On Fri 2004-04-30 at 17.18 Keith T. Garner wrote:
> > Did you manually edit this test domain in LDAP at all?  It looks like
> > either the postmaster entry isn't in LDAP (that's a special entry in
> > LDAP that is hidden from the jamm user) or that the postmaster's
> > roleOccupant attribute is empty.
> No, I didn't edit this or any domain manually, I hardly know how to do
> to go about it.

Hmmm...that's interesting.  Then I'm not sure why this occurred....
Unless you were using an earlier version of Jamm and updated to 0.9.6
without running the update scripts...

> > > When I run jammCleaner I get the same exception:
> > 
> > I'm not surprised, its the same code path more-or-less at the end.
> > 
> > [other stack trace removed]
> Yes, I made sure to myself that it didn't have anything with the
> Cleaner to do, but with what's in the LDAP's register. Just wanted
> you to know what little I knew.

Cool.

> > Can you share with us a dump of the LDAP structure from that domain
> > down?  A command something like this should fit the bill:
> >     ldapsearch -b "jvd=test.test,o=hosting,dc=ttt,dc=intranet" -x
> 
> Here it is, straight up:
> [begin]
> root@apache:~# ldapsearch -b "jvd=test.test,o=hosting,dc=ttt,dc=intranet" -x 

> # [email protected], test.test, hosting, ttt.intranet
> dn: [email protected],jvd=test.test,o=hosting,dc=ttt,dc=intranet
> objectClass: top
> objectClass: JammMailAccount
> mail: [email protected]
> homeDirectory: /home/vmail/domains
> mailbox: test.test/postmaster/
> cn: postmaster
> accountActive: FALSE
> lastChange: 1069761461
> delete: TRUE

This account should never have been created this way, nor could jamm
have created it.  When Jamm creates a domain, it also creates two
"special" entries.  1 for abuse and 1 for postmaster.  The postmaster
entry is *never* an account and it looks similar to the below:

   # postmaster, test.example, hosting, kgarner, com
   dn: cn=postmaster,jvd=test.example,o=hosting,dc=kgarner,dc=com
   objectClass: top
   objectClass: JammPostmaster
   objectClass: JammMailAlias
   mail: [email protected]
   roleOccupant: cn=postmaster,jvd=test.example,o=hosting,dc=kgarner,dc=com
   lastChange: 1052840532
   maildrop: postmaster
   cn: postmaster
   accountActive: TRUE


Since your entry above is an account, I can only imagine someone had
to go in there manually and edit it.  There's no way I can think of
that Jamm would have created that account.

Actually, I can think of a scenario that involves the domain creation
being halted (an error before all the install bugs were worked out?)
before its done and someone manually creating postmaster as an account
in the web interface.

> > The answer to your problem is probably just to go into LDAP and clean
> > it up.  However, that doesn't fix Jamm's problem if its Jamm related.
> > Jamm *shouldn't* leave a mess like this behind, but what's an
> > application without bugs?
> 
> Thanks for your help so far. As I said above, I'm not confident with
> LDAP and I can't tell what's (if anything) wrong from reading the search
> dump above - I'm not familiar with the jamm schema to start with
... :)

Its definitely a schema problem.  I should probably put some code into
Jamm to handle that case more gracefully.  However, it comes down to
someone broke the contract between Jamm and the LDAP schema.

> On the side, I see that one of my co-workers have been playing 'round
> adding the Dumb ***-user account (pardon for his language).

I use worse on an hourly basis :)

> However, he has only had access to the WUI, and only for a limited
> time, so whatever he's done it's been issued through the web
> application.
> 
> So, any help in resolving the postmaster-NPE matter is greatly
> appreciated. ("Cleaning up" my co-worker I'll handle myself. :)

Well, I think your best bet right now is to use an general purpose
graphical LDAP editor like GQ to go in there and just remove the
offending entries.

I'd be curious to know how that ended up being created.

Keith

-- 
  Keith T. Garner                                         [email protected]
   The whole problem with the world is that fools and fanatics are always so
 certain of themselves, and wiser people so full of doubts. --Bertrand Russell


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.