#-----------------------------------------------------------------------------
#convertermbmd.sh
#
#This program is used in order to convert a mailbox system to a mail directory using clement
#It is looking for a standard /var/spool/mail and 
#/var/spool/clement/mails architecture
#
#It verifies that the user found in /var/spool/mail are also in /etc/passwd
#
#
#-d domainname: Define the domain name for creation
# in /var/spool/clement-2.1/mails/. Otherwise, the script
# will try to find it himself, but it's not very reliable.
#
#-b base: Used in case the base of your system isn't /, 
# usually for test purpose.
# 
#
#
#
#-----------------------------------------------------------------------------
#updating from clement-2.1 to clement-2.5
#procedure:
#	create directory /var/spool/prvclem
#		service clement stop
#		service dovecot stop
#		start postgesql data-base if needed
#		Protecting courante data
#		duplicat /etc/clement-2.1 to /var/spool/prvclem/etc
#		duplicat /var/spool/clement-2.1	 /var/spool/prvclem/var/spool
#		mkdir /var/spool/clement-2.1
#		rpm -e clement clement-debuginfo (clement-2.1)
#		remove all clement-2.1 directory
#		remove /etc/sysconfig/clement
#		Erase user clement from /etc/passwd and /etc/shadow
#		Check httpd is still up and running
#		Install dovecot-pgsql
#		Check dovecot is still up and running
#		Check postgresql is still up and running
#		yum install --nogpg clement clement-debuginfo (clement-2.5)
#		start clement
#		stop clement
#		cp -a /var/spool/prvclem/var/spool/clement-2.1/mails/* ~clement/mails
#		cp -a /var/spool/prvclem/var/spool/clement-2.1/logs/* ~clement/logs
#		chown -R clement:mail ~clement/mails ~clement/logs
#		su - clement
#		/usr/lib/clement-2.5/utilities/cnv_21_25.sh for 'Domains'
#		back to root level
#		if there is an owmboxes directory
#		/usr/lib/clement-2.5/utilities/converterOWM1T5.sh -b /var/spool/prvclem -d 'Domains'
#		start clement.
#		
