Re: [qmailtoaster] Re: Email server migration

2019-01-30 Thread Eric Broch
If your method works don't use ours. The only reason I changed was 
because my /home/vpopmail/domains directory was so big took 1 full day 
to backup and 1 full day to restore. I also changed because some of the 
directories changed between QMT on CentOS 5 and QMT on CentOS 7.


On 1/30/2019 1:48 AM, Chandran Manikandan wrote:

Hi Eric & All,

Thanks for your help.
Let me try it out and update you.

I have used qt-backup and qt-restore option in my previous migration. 
it was working fine.

Let me try Eric and Biju steps.


On Wed, Jan 30, 2019 at 7:43 AM Eric Broch > wrote:


The linux command, "hostname", with backticks, i.e.,`hostname`,
called command substitution, allows output of a command to be
stored in another context, in this case the variable 'HOSTNAME'.

If I run the command "hostname" (below) at the prompt I get the
following:

# hostname
myhost.mydomain.com 

If I run the command "HOSTNAME=`hostname`" (below) at the prompt
the output is stored in the variable 'HOSTNAME' (another context).

# HOSTNAME=`hostname`

# echo $HOSTNAME
myhost.mydomain.com 


On 1/29/2019 3:27 PM, Jeff Koch wrote:

Remo:

Thanks - I never would have thought of that.

Jeff

On 1/29/2019 5:23 PM, Remo Mattei wrote:

The `hostname` is a short hand for $(hostname). It basically
reads the hostname.

Example:
echo $(hostname)
qmail.rm.ht 



On Jan 29, 2019, at 14:20, Jeff Koch
mailto:jeffk...@intersessions.com>> wrote:

OK - no problem - on the second question what is supposed to go
into HOSTNAME=`hostname` ? Is it 'localhost' or the server's
actual host name?

Jeff


On 1/29/2019 5:17 PM, Eric Broch wrote:


That authentication line is for the development

version of qmail (1.03-3.1) which utilizes the
qmail-authentication-0.8.3
 patch (old patch:
0.5.7). I haven't compiled it yet for the qmail cdb which, I
think, you use.

On 1/29/2019 8:57 AM, Jeff Koch wrote:

Eric - where does that line go? In the
/var/qmail/supervise/submission/run file?  I currently have:

I just noticed HOSTNAME is not set - what should it be?

QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
HOSTNAME=`hostname`
VCHKPW="/home/vpopmail/bin/vchkpw"
export REQUIRE_AUTH=1

exec /usr/bin/softlimit -m 12800 \
    /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c
"$MAXSMTPD" \
    -u "$QMAILDUID" -g "$NOFILESGID" 0 587 \
    $SMTPD $VCHKPW /bin/true 2>&1

Jeff

On 1/29/2019 10:21 AM, Eric Broch wrote:


It has to do with a recent past issue "!+cram" forces
encrypted passwords in submission and make sure qmail-queue
is not pointing to qmail-dk...it shouldn't be.

On 1/29/2019 8:05 AM, Jeff Koch wrote:

Hi Eric:

Great summary of the tasks but I don't understand item 7 -
can you please explain ?

Jeff

On 1/29/2019 8:29 AM, Eric Broch wrote:


Hi Chandran,

Here's what I do:

1) Install Qmail according to link update from testing &
development as you see fit (https://www.qmailtoaster.org
)

2) Dump mysql database on old machine and copy to new machine
mysql_file=/home/vpopmail/etc/vpopmail.mysql
if [ -f $mysql_file ]; then
  mysql_host=`cut -d\| -f1 < $mysql_file`
  mysql_port=`cut -d\| -f2 < $mysql_file`
  mysql_user=`cut -d\| -f3 < $mysql_file`
  mysql_password=`cut -d\| -f4 < $mysql_file`
  mysql_database=`cut -d\| -f5 < $mysql_file`
fi
mysqldump -u $mysql_user -p$mysql_password -h $mysql_host
$mysql_portparm $mysql_database > ./vpopmail.sql

3) rsync the following directories old server to new
server...squirrelmail, spamassassin, tcprules.d if you
need them.
/home/vpopmail/domains
/var/lib/squirrelmail
/usr/share/squirrelmail
/etc/spamassassin/*.cf
/etc/spamassassin/.spamassassin
/etc/tcprules.d
/var/qmail/users

4) Import mysql database in new machine
mysql -uroot -p vpopmail < ./vpopmail.sql

5) Copy any file in /var/qmail/control/ that you want.
(usually not necessary)

6) Copy any run setting that you want. (usually not necessary)

7) Make sure if you use testing and development repos
(DomainKeys dropped in development) to check run
authentication run settings (export SMTPAUTH="!+cram")

8) stop and start qmail

On 1/28/2019 9:24 PM, Chandran Manikandan wrote:

Hi Biju,

Thanks for your help and steps.

Can i use the qt-backup script to take all the backup 

Re: [qmailtoaster] Re: Email server migration

2019-01-30 Thread Chandran Manikandan
Hi Eric & All,

Thanks for your help.
Let me try it out and update you.

I have used qt-backup and qt-restore option in my previous migration. it
was working fine.
Let me try Eric and Biju steps.


On Wed, Jan 30, 2019 at 7:43 AM Eric Broch  wrote:

> The linux command, "hostname", with backticks, i.e.,`hostname`, called
> command substitution, allows output of a command to be stored in another
> context, in this case the variable 'HOSTNAME'.
>
> If I run the command "hostname" (below) at the prompt I get the following:
>
> # hostname
> myhost.mydomain.com
>
> If I run the command "HOSTNAME=`hostname`" (below) at the prompt the
> output is stored in the variable 'HOSTNAME' (another context).
>
> # HOSTNAME=`hostname`
>
> # echo $HOSTNAME
> myhost.mydomain.com
>
>
> On 1/29/2019 3:27 PM, Jeff Koch wrote:
>
> Remo:
>
> Thanks - I never would have thought of that.
>
> Jeff
>
> On 1/29/2019 5:23 PM, Remo Mattei wrote:
>
> The `hostname` is a short hand for $(hostname). It basically reads the
> hostname.
>
> Example:
> echo $(hostname)
> qmail.rm.ht
>
>
> On Jan 29, 2019, at 14:20, Jeff Koch  wrote:
>
> OK - no problem - on the second question what is supposed to go into
> HOSTNAME=`hostname` ? Is it 'localhost' or the server's actual host name?
>
> Jeff
>
>
> On 1/29/2019 5:17 PM, Eric Broch wrote:
>
> That authentication line is for the development
> 
> version of qmail (1.03-3.1) which utilizes the qmail-authentication-0.8.3
>  patch (old patch: 0.5.7). I
> haven't compiled it yet for the qmail cdb which, I think, you use.
> On 1/29/2019 8:57 AM, Jeff Koch wrote:
>
> Eric - where does that line go? In the /var/qmail/supervise/submission/run
> file?  I currently have:
>
> I just noticed HOSTNAME is not set - what should it be?
>
> QMAILDUID=`id -u vpopmail`
> NOFILESGID=`id -g vpopmail`
> MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
> SMTPD="/var/qmail/bin/qmail-smtpd"
> TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
> HOSTNAME=`hostname`
> VCHKPW="/home/vpopmail/bin/vchkpw"
> export REQUIRE_AUTH=1
>
> exec /usr/bin/softlimit -m 12800 \
> /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
> -u "$QMAILDUID" -g "$NOFILESGID" 0 587 \
> $SMTPD $VCHKPW /bin/true 2>&1
>
> Jeff
>
> On 1/29/2019 10:21 AM, Eric Broch wrote:
>
> It has to do with a recent past issue "!+cram" forces encrypted passwords
> in submission and make sure qmail-queue is not pointing to qmail-dk...it
> shouldn't be.
> On 1/29/2019 8:05 AM, Jeff Koch wrote:
>
> Hi Eric:
>
> Great summary of the tasks but I don't understand item 7 - can you please
> explain ?
>
> Jeff
>
> On 1/29/2019 8:29 AM, Eric Broch wrote:
>
> Hi Chandran,
>
> Here's what I do:
>
> 1) Install Qmail according to link update from testing & development as
> you see fit (https://www.qmailtoaster.org)
>
> 2) Dump mysql database on old machine and copy to new machine
> mysql_file=/home/vpopmail/etc/vpopmail.mysql
> if [ -f $mysql_file ]; then
>   mysql_host=`cut -d\| -f1 < $mysql_file`
>   mysql_port=`cut -d\| -f2 < $mysql_file`
>   mysql_user=`cut -d\| -f3 < $mysql_file`
>   mysql_password=`cut -d\| -f4 < $mysql_file`
>   mysql_database=`cut -d\| -f5 < $mysql_file`
> fi
> mysqldump -u $mysql_user -p$mysql_password -h $mysql_host $mysql_portparm
> $mysql_database > ./vpopmail.sql
>
> 3) rsync the following directories old server to new
> server...squirrelmail, spamassassin, tcprules.d if you need them.
> /home/vpopmail/domains
> /var/lib/squirrelmail
> /usr/share/squirrelmail
> /etc/spamassassin/*.cf
> /etc/spamassassin/.spamassassin
> /etc/tcprules.d
> /var/qmail/users
>
> 4) Import mysql database in new machine
> mysql -uroot -p vpopmail < ./vpopmail.sql
>
> 5) Copy any file in /var/qmail/control/ that you want. (usually not
> necessary)
>
> 6) Copy any run setting that you want. (usually not necessary)
>
> 7) Make sure if you use testing and development repos (DomainKeys dropped
> in development) to check run authentication run settings (export
> SMTPAUTH="!+cram")
>
> 8) stop and start qmail
> On 1/28/2019 9:24 PM, Chandran Manikandan wrote:
>
> Hi Biju,
>
> Thanks for your help and steps.
>
> Can i use the qt-backup script to take all the backup in old server?
> Then move this compress file into new server to qt-restore command.
>
> Anyone have any idea about this?
>
> And one more doubt.
>
> Can i use the same procedure for Hard disk upgrade from old hard disk to
> new hard disk in the same machine or any other simple step there?
>
> Thanks in advance.
>
>
> On Fri, Jan 25, 2019 at 6:18 PM Biju Jose  wrote:
>
>> 1. Setup new server
>>
>> 2. Create a new domain ( vadddomain) and import the MySQL table of that
>> domain from the old server.
>>
>> 3. RSync the mail folder from the old to the new
>>
>> rsync -arvz -e 'ssh -p 8022' –progress
>> r...@oldserver.com:/home/vpopmail/domains/domain1.com/
>>