[Chicago-talk] Perl Help

Young, Darren Darren.Young at ChicagoGSB.edu
Wed Jan 18 09:50:06 PST 2006


Ok then, here goes. Perhaps more detail that anyone needs, but better
safe than sorry.

The first project under way is increasing the student mail quota from
40MB to 100MB. While this doesn't sound like much, when you take it x
5000 mailboxes it becomes a pain. The largest problems are that 1) we
have constant account maintenance activity (adds/changes/deletes) so
there has to be a firm process and 2) a single large partition of 300+GB
is a real witch to fsck when things have unplanned downtime. What I've
done to get around #2 is to create many small (50GB) LUN's on the SAN
and map those up to the mail server. Each of those then has a single
slice/filesystem and is mounted up on the host. The mail server (iPlanet
5.2) then has a mail partition/store on each of those. Account adds /
moves will simply round-robin on all of those small partitions. When one
of those starts getting chummy, we'll move some off to another one.

Now, the 5000 accounts I'm speaking of here are active students. In
addition to those we have 30,000 alumni accounts since everyone here
gets 'email for life'. Not a forward, a real 20MB mailbox. These
mailboxes are stored on an AS5200 array as opposed to the SAN. And, at
this point, all of the student mailboxes are as well. Which leads me to
what has to be done first. Move the student mailboxes over to the SAN
stores.

iPlanet has a single command to do a mailbox move from a given mail
partition to another one. The problem is it doesn't do things like
locking the mailbox during the move, deny access during, etc. Sun wants
the mail server down to do the move. Even at wire speed on a 2GB HBA to
the SAN, that means many many hours of downtime. I know 90% of the
things that have to be done to move the mailbox in a safe manner, what I
need to create is a generic method and a command wrapper to perform the
operations. Basically:

1. 2 LDAP attributes that have to be changed to hold delivery to the
mailbox and deny access to it (POP, IMAP and HTTP).
2. Any active POP or IMAP processes talking to the mailbox have to be
killed.
3. A system command is issued to the message server to perform the move.
4. The reverse of #2 and #1 needs to be performed.
5. Another system command is issued to start delivery of mail that was
held.

The command wrapper around this needs to be able to act on a single
mailbox/LDAP DN or work on many of them fed from a file. Reason for the
file (or many on the command line) is for graduation. 1 quarter after
students graduate they become official alumni which means their quota is
reduced and their mailbox is moved to the alumni mailstore (and
different server). When these requests come through from our
account/student maintenance system they come through in bulk between 800
and 1500 at a time.

This same routine will then need to be integrated into our existing
account maintenance system which is written in Perl. This takes care of
all the initial adds/changes/deletes but has no ability to place
mailboxes on certain stores. Since we always had a single store, I had
built all the LDAP portions to take the message server defaults. This is
where the round-robin ability comes in. When an account add request
comes through, the LDAP create code needs to "fling" the creates around
many stores in a fairly even manner. Was thinking it would remember
where it created the last one and use the next one in line.

There are 2 or 3 other projects along the same lines, all Perl and
pretty much all account maintenance related. If anyone has questions and
wants more details, feel free to call me at the office. 773-702-0331.

And thanks for all the other help.


More information about the Chicago-talk mailing list