RE: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Bill Gradwohl
On Wed, 2006-01-04 at 18:40 +0100, Michele Virgilio wrote:
> Thanks for our replies, so can anyone give me a script to automate this
> process?

Here's a script to look at your current vpopmail area and write the
commands needed to recreate that area. Just redirect the output from the
script to a file and that file now contains the commands needed to
recreate your environment.

#!/bin/bash 

cd /home/vpopmail/domains
find . -maxdepth 1 -mindepth 1 -type d | sed 's#\./##'|while read x; do 
   password="$(grep postmaster $x/vpasswd  | sed 's/^.*://')" 
   echo '/home/vpopmail/bin/vadddomain ' \'$x\' \'$password\'
   sed "s/:.*:/:/;s#^#/home/vpopmail/bin/vadduser #;s/:/@$x '/;s/$/'/"
$x/vpasswd|grep -v postmaster
done


Grabbing the users .qmail files, and any existing mail can be done as
follows:

#!/bin/bash

cd /home/vpopmail/domains
find . -name .qmail* | tar -c -T - >/root/q.tar
find . -type d -name 'Maildir'|sed 's#$#/new#'|tar -c -T - >/root/M.tar


If you want to grab the /var/qmail/control area, just tar it as in :

tar -c /var/qmail/control >/root/c.tar


I find that taking real backups of things via tape backup, rsync, etc
although useful at times, isn't exactly that useful when I want to
create a new server. 

When I want a new box, its got a newer O/S, newer versions of vpopmail,
newer qmail (patches), newer clamav, etc, and trying to tar dump an old
environment into a new one isn't trivial.

Therefore, I prefer to create the commands needed to recreate the
environment from scratch which assumes I've had a catastrophic failure,
and was forced to create a new box up to the point where I want to add
domains and users. Then the info from the scripts above comes into play.

We rsync the entire box to a spare drive in a different box every night.
>From that spare drive, we can extract whatever info we want even after
the real box has died, got stolen (it happened), whatever.

This isn't everything you need to do, but its a start to get you
thinking.

-- 
Bill Gradwohl




RE: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Michl
Thanks, very nice! :)

> -Original Message-
> From: Charles J. Boening [mailto:[EMAIL PROTECTED]
> Sent: mercoledì 4 gennaio 2006 19.13
> To: vchkpw@inter7.com
> Subject: RE: [vchkpw] VPOPMAIL Backup
> 
> How about putting this in as a cron job:
> 
> tar jcf /home/email.backup.tar.bz2 /home/vpopmail /var/qmail/control
> /var/qmail/users
> 
> 
> 
> You could also make an offsite backup
> 
> 
> ERR=/var/log/backup/backup-err.log
> BACKUP="/home/vpopmail /var/qmail/assign /var/qmail/users"
> FTP_SERVER="some.server.com"
> FTP_USER="ftp"
> FTP_PASS="passwd"
> 
> /bin/tar -jclpf - $BACKUP 2>$ERR | ncftpput -c -u $FTP_USER -p $FTP_PASS
> $FTP_SERVER backup.tar.gz
> 
> 
> Or something like that.
> 
> But like the other guy said, Google is your friend.
> 
> 
> Charlie
> 
> 
> 
> 
> > -Original Message-
> > From: Michele Virgilio [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, January 04, 2006 9:40 AM
> > To: vchkpw@inter7.com
> > Subject: RE: [vchkpw] VPOPMAIL Backup
> >
> > >
> > >
> > > For qmail
> > >
> > > /var/qmail/control/*
> > > /var/qmail/users/*
> > >
> > > Your tcp.smtp file, where ever that may be stored (usually
> > in /etc or
> > > ~vpopmail/etc)
> > >
> > >
> > > For vpopmail
> > >
> > > All the .qmail* files in each domain, plus all the .qmail
> > files in the
> > > users directory if wanted.
> > >
> > >
> > > We personally do an rsync backup of /var/qmail and
> > /home/vpopmail for
> > > most of our clients servers, either to a separate machine or drive.
> > >
> >
> > Thanks for our replies, so can anyone give me a script to
> > automate this process?
> >
> > Thanks,
> > Mik
> >
> >
> >





RE: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Charles J. Boening
How about putting this in as a cron job:

tar jcf /home/email.backup.tar.bz2 /home/vpopmail /var/qmail/control
/var/qmail/users 



You could also make an offsite backup


ERR=/var/log/backup/backup-err.log
BACKUP="/home/vpopmail /var/qmail/assign /var/qmail/users"
FTP_SERVER="some.server.com"
FTP_USER="ftp"
FTP_PASS="passwd"

/bin/tar -jclpf - $BACKUP 2>$ERR | ncftpput -c -u $FTP_USER -p $FTP_PASS
$FTP_SERVER backup.tar.gz


Or something like that.

But like the other guy said, Google is your friend.


Charlie




> -Original Message-
> From: Michele Virgilio [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 04, 2006 9:40 AM
> To: vchkpw@inter7.com
> Subject: RE: [vchkpw] VPOPMAIL Backup
> 
> > 
> > 
> > For qmail
> > 
> > /var/qmail/control/*
> > /var/qmail/users/*
> > 
> > Your tcp.smtp file, where ever that may be stored (usually 
> in /etc or
> > ~vpopmail/etc)
> > 
> > 
> > For vpopmail
> > 
> > All the .qmail* files in each domain, plus all the .qmail 
> files in the 
> > users directory if wanted.
> > 
> > 
> > We personally do an rsync backup of /var/qmail and 
> /home/vpopmail for 
> > most of our clients servers, either to a separate machine or drive.
> > 
> 
> Thanks for our replies, so can anyone give me a script to 
> automate this process?
> 
> Thanks,
> Mik 
> 
> 
> 


Re: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread alex

>Thanks for our replies, so can anyone give me a script to automate this
>process?
>  
>
You want fries with that?

Go google for some or even read the folowing:
man rsync
man cron

Go to www.tldp.org and search for the BASH How-To which is a great
newbie tutorial for those new to unix or sh like shells.

>Thanks,
>Mik 
>
>  
>



Re: [vchkpw] Re: Is chkuser 2.0 suitable for my system?

2006-01-04 Thread Bob Hutchinson
On Wednesday 04 Jan 2006 15:29, ro0ot wrote:
> All my virtual domain in my system is with catchall account set to
> [EMAIL PROTECTED], hence this will not work because chkuser will
> accept all emails even it is invalide, am I right?

yes, think so.

>
> How can I create a specific bounce-no-mailbox account to have chkuser
> refuse invalid emails?

cd /home/vpopmail/domains/domain.dom
echo "| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" > .qmail-default
chown vpopmail.vchkpw .qmail-default
chmod 600 .qmail-default

for each domain

HTH
-- 
-
Bob Hutchinson
Midwales dot com
-


RE: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Michele Virgilio
> 
> 
> For qmail
> 
> /var/qmail/control/*
> /var/qmail/users/*
> 
> Your tcp.smtp file, where ever that may be stored (usually in /etc or
> ~vpopmail/etc)
> 
> 
> For vpopmail
> 
> All the .qmail* files in each domain, plus all the .qmail files in the
> users directory if wanted.
> 
> 
> We personally do an rsync backup of /var/qmail and /home/vpopmail for
> most of our clients servers, either to a separate machine or drive.
> 

Thanks for our replies, so can anyone give me a script to automate this
process?

Thanks,
Mik 




Re: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Rick Macdougall

Michl wrote:
Hi all, 
i need to setup a configuration backup for all my vpopmail domains, vpopmail

settings, and qmail settings.
What are the files I need to store in my backup to get a quickly disaster
recovery?


Hi,


For qmail

/var/qmail/control/*
/var/qmail/users/*

Your tcp.smtp file, where ever that may be stored (usually in /etc or 
~vpopmail/etc)



For vpopmail

All the .qmail* files in each domain, plus all the .qmail files in the 
users directory if wanted.



We personally do an rsync backup of /var/qmail and /home/vpopmail for 
most of our clients servers, either to a separate machine or drive.


HTH,

Rick



Re: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread alex
Michl wrote:

>Hi all, 
>i need to setup a configuration backup for all my vpopmail domains, vpopmail
>settings, and qmail settings.
>What are the files I need to store in my backup to get a quickly disaster
>recovery?
>Thanks,
>Mik
>
>
>  
>
Qmail's config root:
/var/qmail (in my box)
/etc/tcp.smtp

Vpopmail virtual domains root
/home/vpopmail (in my box)

There... thats what you need.

In my experiencie, just tarring that will do the trick. The only problem
will be what happens with new email well, put an smtp box that
queues before your box just so you dont loose anything and THEN tar,
then let the in-the-middle box forward to you and youre home free.



[vchkpw] VPOPMAIL Backup

2006-01-04 Thread Michl

Hi all, 
i need to setup a configuration backup for all my vpopmail domains, vpopmail
settings, and qmail settings.
What are the files I need to store in my backup to get a quickly disaster
recovery?
Thanks,
Mik





Re: [vchkpw] Re: Is chkuser 2.0 suitable for my system?

2006-01-04 Thread ro0ot
All my virtual domain in my system is with catchall account set to 
[EMAIL PROTECTED], hence this will not work because chkuser will 
accept all emails even it is invalide, am I right?


How can I create a specific bounce-no-mailbox account to have chkuser 
refuse invalid emails?



Stephane Bouvard [ML] wrote:


Hi,

,- - [ Le dimanche 25 décembre 2005 vers 22:48 ro0ot écrivait: ] - -
|
 

I have vpopmail using catchall account for all the virtual domain.  Can 
chkuser 2.0 works with catchall account?  Is chkuser 2.0 suitable for my 
system?
   



chkuser work with catchall, but if you only have domains with catchall, chkuser 
will become useless : if you have a catchall, any email address should be valid 
and thus accepted by chkuser...  thus chkuser will refuse no mail, except if 
you create specific bounce-no-mailbox accounts.


|
`- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Best regards...
_
(_'
,_)téphane Bouvard [antarex AT freenet DOT be] http://www.antarex.be