Hi guys,
 
Now that i'm writing the tools to add and remove e-mail accounts, virtual domains, change user passwords, etc, i'm facing a problem: How can I remove de Maildirs from the deleted users in a clustered environment?
 
This is not as easy as it appears to be. For you understand this problem, follow this example. I have split a unique domain into 3 qmail-ldap mailservers, mailserver1, mailserver2 and mailserver3. Also, the e-mail accounts are distributed by these servers in such a manner that [EMAIL PROTECTED],com has its maildir created in mailserver1, [EMAIL PROTECTED] has its maildir in mailserver2 and [EMAIL PROTECTED] has its maildir in mailserver3.
 
The master LDAP directory is installed in mailserver1. My tools to add and remove e-mails are also running in this mailserver.
 
When I create a new user, suffice adding the new user entry to the master LDAP directory in mailserver1 that the replication takes place(slurpd) and the slave directories in mailserver2 and 3 realize the new entry.  The new user's Maildir gonna be created automatically when the first e-mail arrives for this user, it doesn't matter which mailserver is the mailhost of this account.
 
The same thing does not occur when I'm deleting users. When I remove the user's entry from the master LDAP directory, the replication takes action and updates the slave directories with this change, but, unfortunately, the Maildir of the removed user still remains in the mailserver it was created.
 
I don't want to manually go to that mailserver(via ssh or telnet) and remove the old Maildirs each time I delete an e-mail entry from the directory.
 
How are you dealing with this problem?
(i'm thinking some approaches, but i'd like to gather more opinions...)
 
Thanks,
-------------------------------------------------
Bruno Negrao
Network Manager

 
 

Reply via email to