Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-06-17, 03:28:48

Author Topic: Final script to convert to qmailtoaster  (Read 8734 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Final script to convert to qmailtoaster
« on: 2013-03-02, 00:59:08 »
Tested and working fine !

Code: [Select]
#!/bin/sh

if rpm -q qmail-toaster 2>&1 > /dev/null ; then
        echo
        echo "Mail server already use qmail-toaster"
        echo
        if ! [ "$1" == "--force" ] ; then
                exit
        fi
else
        echo
        echo "Mail server already use qmail from LxCenter"
        echo "Convert processing..."
        echo
fi

cd /
service courier-imap stop
service qmail stop
service xinetd stop
killall -9 spamd
killall -9 clamd
killall -9 freshclam
yum remove qmail vpopmail *-toaster spamassassin -y
rpm -e --noscripts vpopmail
rm -f /etc/xinetd.d/*_lxa
chkconfig courier-imap off
rm -f /etc/rc.d/init.d/courier-imap
cp -f /usr/local/lxlabs/kloxo/file/kloxo-mr.repo /etc/yum.repos.d/kloxo-mr.repo
yum clean all
userdel qmaillog
userdel lxpopuser
userdel vchkpw
userdel vpopmail
groupdel vpopmail
groupdel lxpopgroup
groupdel vchkpw
groupdel qmail
groupadd -g 89 vchkpw
useradd -u 89 -G vchkpw vpopmail -s '/sbin/nologin'
groupmod -g 89 vchkpw
usermod -u 89 -G vchkpw vpopmail
yum install *toaster -y
echo 'localhost' > /var/qmail/control/locals
mv /var/qmail/users/assign.rpmsave /var/qmail/users/assign
mv /var/qmail/users/cdb.rpmsave /var/qmail/users/cdb
mv /var/qmail/control/rcpthosts.rpmsave /var/qmail/control/rcpthosts
sh /script/fixvpop
sed -i 's/-u vpopmail/-u root/g' /var/qmail/supervise/submission/run
sed -i 's/-g vpopmail/-g root/g' /var/qmail/supervise/submission/run
sed -i 's/-u vpopmail/-u root/g' /var/qmail/supervise/smtp/run
sed -i 's/-g vpopmail/-g root/g' /var/qmail/supervise/smtp/run
sed -i 's/-u vpopmail/-u admin/g' /var/qmail/supervise/spamd/run
service xinetd start
/etc/rc.d/init.d/qmail start
sleep 5
qmailctl stat
echo "Make sure all are up and running"

echo "If yes no need to reboot!"
echo
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Final script to convert to qmailtoaster
« Reply #1 on: 2013-03-02, 01:10:46 »
This portion:
Code: [Select]
sed -i 's/-u vpopmail/-u root/g' /var/qmail/supervise/submission/run
sed -i 's/-g vpopmail/-g root/g' /var/qmail/supervise/submission/run
sed -i 's/-u vpopmail/-u root/g' /var/qmail/supervise/smtp/run
sed -i 's/-g vpopmail/-g root/g' /var/qmail/supervise/smtp/run
sed -i 's/-u vpopmail/-u admin/g' /var/qmail/supervise/spamd/run
is bad idea because:
Code: [Select]
#!/bin/sh
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 64000000
    /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
as default by qmail-toaster.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Final script to convert to qmailtoaster
« Reply #2 on: 2013-03-02, 01:16:19 »
But didn't worked for me so I will use this what is working.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Final script to convert to qmailtoaster
« Reply #3 on: 2013-03-02, 01:20:47 »
Different with you, it's ok for me. This week I was update more then 10 'old' Kloxo to Kloxo-MR.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Final script to convert to qmailtoaster
« Reply #4 on: 2013-03-02, 01:23:25 »
Quote from: "MRatWork"
Different with you, it's ok for me. This week I was update more then 10 'old' Kloxo to Kloxo-MR.

My systems were very old probably started from 6.1.6 or something ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Final script to convert to qmailtoaster
« Reply #5 on: 2013-03-02, 01:26:15 »
Quote from: "Spacedust"
Quote from: "MRatWork"
Different with you, it's ok for me. This week I was update more then 10 'old' Kloxo to Kloxo-MR.

My systems were very old probably started from 6.1.6 or something ;)
Yes, you right.

Kloxo 6.1.7 also fix some issue related to qmail like mail directory not inside /home/lxadmin/mail/domains but inside /.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Final script to convert to qmailtoaster
« Reply #6 on: 2013-03-02, 01:30:01 »
Quote from: "MRatWork"
Quote from: "Spacedust"
Quote from: "MRatWork"
Different with you, it's ok for me. This week I was update more then 10 'old' Kloxo to Kloxo-MR.

My systems were very old probably started from 6.1.6 or something ;)
Yes, you right.

Kloxo 6.1.7 also fix some issue related to qmail like mail directory not inside /home/lxadmin/mail/domains but inside /.

I will stay with CentOS 5.9 on my already working servers and will install 6.3 on a new ones.

Hope I can mix CentOS 5.9 and 6.3 on slaves ;)

Any progress on fixing disk usage counting and non-working logs with many domains on nginx ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.028 seconds with 18 queries.

web stats analysis