On 10/1/07, Rick Widmer <[EMAIL PROTECTED]> wrote:
>
> Carlos Collart wrote:
> > I am the dumbest person alive, and in charge of a vpopmail server,
> > I manage to drop database vpopmail

Not good...  Before you do anything else it might be wise to stop qmail,
> and all qmail-smtp processes then back up the mail store.


Donne...

> the system was a production one, under the domain xx_at_aduanett_dot_hn
> > I have a backup with the username, gecos ,cleartext password in a CVS
> format
>
> Just one domain, or many?

 2 domains (aduanett_dot_hn and fenaduanah_dot_hn)
defaultdomain= aduanett_dot_hn
and users in the other domain login
username_at_fenaduanah_dot_hn

>
>
> > how could i re-poblate the mysql directly?
> > insert values(xxx,hash(xxx),xx,xx) into 'aduanett.hn
> > <http://aduanett.hn>'.vpopmail or crypt?
>
> This may be the easiest method available.  You will have to write a
> Perl, php or whatever program to populate the database.  The password
> hash method depends on your ./configure options.  It is pretty easy
> unless you have to track down hashed directories.


i am currently building a sql insert script using openoffice calc
insert into aduanett_hn
values('postmaster',md5('passw0rd'),89,89,'Postmaster','/home/vpopmail/domains/aduanett.hn/postmaster','','passw0rd')

but qmail fail to authenticate maybe md5('passwr0rd') need tweaks


Another way is to save the mail and re-create the mail accounts...  If
> you have hashed directories, it is unlikely that the same accounts will
> end up in the same hash directories, so this will not work.
>
>
>
> Stop mail delivery     //   The mail store will be inconsistent during
> this process, and it is already broken.
>
> Backup the mail store to disk or tape, so you have a place to fallback
> to if this process fails.


i am doing this thru sFTP to another Server just in case (slow process btw)

cd ~vpopmail/domains    //   Move to the domain storage directory
>
> mv targetdomain.com targetdomain.com.old   //  save the mail
>
> vdeldomain targetdomain.com    //  clean out all records of domain
>
> vadddomain targetdomain.com    //  recreate a new empty domain
>
> vadduser - all users from your list  //  restore the users
>
> compare the structure of targetdomain.com and targetdomain.com.old
>
> if it exists in targetdomain.com but not targetdomain.com.old you may
> want to delete the user, or find out why it is missing.
>
> if it exists in targetdomain.com.old but not in targetdomain.com you may
> need to vadduser it.
>
>
> Once you have reconciled the domain directories:
>
> rm -r targetdomain.com    //   Delete the new directory tree
>
> mv targetdomain.com.old targetdomain.com   //   put the old mail back
>
> repeat the steps after "cd ~vpopmail/domains" for each affected domain
>
> restart mail delivery.
>
>
>
>


-- 
atte.
[EMAIL PROTECTED]
http://www.danasoft.com/sig/CarlosCollart.jpg

Reply via email to