Related thread: http://forum.directadmin.com/showthread.php?t=50294 Early version of the E-Mail Account cluster/sync feature. This will simply sync the account information over to the other DA box. It will use the API to login as this remote User (using the "login-as") and will match the commands done locally. ------------------------- Currently supports: - create account - change account - delete accounts - suspend/unsuspend accounts ------------------------- Currently does not support: - pop disk usage reported to main box - send count reported to main box ------------------------- Optional files for fine control: /usr/local/directadmin/data/admin/cluster_email_allow.list /usr/local/directadmin/data/admin/cluster_email_deny.list both of these lists can contain Users and/or domains. 1) If neither file exists, all Users/Domains are synced 2) If allow exists, no Users/Domains are synced, unless in this file. This file overrides deny. 3) If User and/or Domain is the deny, email will not be synced. -> Only one of the User or Domain is required in the allow file. If either is present, email is synced. -> If either of the User or Domain is in the deny, the email will not be synced, unless already allowed via "allow" -> if allow exists, the deny is never checked. --------------------------- SYNC When you first turn on the feature, if A has accounts, but B does not, you can sync A to B with: echo "action=rewrite&value=email_passwd" >> /usr/local/directadmin/data/task.queue ============================ FAILURES if the remote box, like the dns clustering options, DA uses a task.queue retry for all commands, as long as you set the directadmin.conf setting "remote_dns_retries" to a non-zero value. The format of the task.queue entry is: action=sync&type=cluster&value=email&username=fred&host=220.127.116.11&count=10&request=longrequest where: - fred is the DA username that called the email command - host is the host that failed, so it will only retry the single failed host - count counts down from the directadmin.conf option remote_dns_retries, until 0. The default is 0, so retries are not enabled by default. - longrequest is URL encoded post from the original client request. DA basically passes it to the User in the same manner. ========================== REQUIREMENTS - Both the DirectAdmin Username and domain must exist on both servers. This may require you shut off the MSS on both servers until the account/domain exists, then turn it back on. - the receiving server (mirror) does need DA 1.48.0+ - DA will call the CMD_API_POP command on the remote server, so ensure this is allowed in your login key. - the "Login As" feature is used, so ensure this is allowed on the remote box, for the given login key. Related changes: CMD_API_POP now optionally accept the select0=fred&select1=bob method for deleting/suspending/unsuspending multiple email accounts. Previously, it only accepted single accounts with "user=fred", which does still work if present.