On Wednesday 26 March 2003 08:42, Matt wrote:
> Ok,
> I want to make sure I understand how this works...
> This will go through the LDAP and check every record against every
> maildir?
> My mail directories are by customer ID ie: "511425" which is also a
> value in LDAP called "x500uniqueIdentifier"

We have our maildirs setup like this:

/home/users/domain/username

So, the script goes through every mailbox and checks if there is a 
corresponding entry on the ldap server. Obviously yours will be a bit 
different but the logic should be mostly the same:

Get list of mailboxes
Foreach mailbox
        Check if account exists on LDAP server
        IF not exist
                Archive / Delete mailbox


Maybe someone else has a better way but I've tested this out and it works 
quite well.

-- 
Brendon Colby
Systems Administrator
Midcontinent Communications

Reply via email to