[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Update Cyrus 1.5.19 auf cyrus21 - Userverzeichnisse?



Hallo zusammen,

ich hatte dummerweise die cyrus-Pakete (1.5.19) installiert, da ich cyrus21
nicht gesehen hatte. Jetzt wollte ich updaten, dazu habe ich in
/usr/share/doc/cyrus21-doc das UPGRADE.Debian gefunden und befolgt.

Allerdings will das nicht klappen, vielleicht habe ich ja nur einen
zentralen Punkt übersehen? Vor allem die Migration der Userverzeichnisse auf
Berkeley-DB klappt wohl nicht, wobei ich sagen muss das ich zum ersten Mal
(zumindest bewußt :) mit Berkeley-DB in Berührung komme.

Ich habe das mal um meine Anmerkungen ergänzt (englisch, da auch das
Dokument in Englisch ist, soll ich das übersetzen?), vielleicht mögt ihr da
mal drüber gucken ob euch was dazu einfällt? Das wäre sehr nett. Ich hab den
Text unten zitiert, Attachements sind hier wahrscheinlich nicht angebracht,
oder?

Viele Grüße
André

------- UPGRADE.Debian ergänzt ---------

Upgrading cyrus-imapd to cyrus2-imapd on Debian
$Id: UPGRADE.Debian,v 1.15 2004/11/23 12:35:35 hmh Exp $
(thanks to David D. Kilzer <ddkilzer@theracingworld.com> for this document)
-----------------------------------------------

For more information, see README.Debian[.gz] in
/usr/share/doc/cyrus21-common/
and the web page below, part of the cyrus-utils project at SourceForge:

http://cyrus-utils.sourceforge.net/faq

This document describes the procedure for upgrading from the old cyrus-imapd
(v1.5.x) package to the new cyrus21-imapd (v2.1) package. While this is a
manual process, it is very straightforward.

The procedure for converting a v1.6 cyrus store to v2.1 is not explained
here,
but the tools to convert the sieve scripts are in /usr/lib/cyrus/upgrade.

Your SASL installation may require further conversion steps, as Cyrus v2.1
uses
SASL v2, while Cyrus v1.5 used SASL v1.5. /usr/share/doc/libsasl2 has more
information on SASL v2. Do pay attention to your SASL v2 installation, such
as permissions and such. When in doubt, read the README.simpleinstall
document, as it describes an initial SASLv2 setup.

NOTE: If you've already installed the cyrus21 packages, skip to step 5.

1. Become the "root" user on your local system.

$ /bin/su -
#

2. Look for any running cyrus daemons using the ps(1) command. Use
kill(1) to stop any processes that are found.

# /etc/init.d/pwcheck stop
# ps auwwx | grep cyr
# ps auwwx | grep pop3d
# ps auwwx | grep imapd
# ps auwwx | grep nntpd

3. Remove the old cyrus packages.

# apt-get --purge remove cyrus-common cyrus-admin cyrus-imapd cyrus-pop3d \
cyrus-nntpd

or use dselect/aptitude/synaptic/your favorite deb management tool.

IMPORTANT: You must answer "n" to this question: "Do you want me to
remove the Cyrus mail and news spool (y/n) [n] ?"

frisco 20050829: no question, directories removed, backup restored

NOTE: You could also copy -a the /var/spool/cyrus and /var/lib/cyrus
folders somewhere else, just in case.

frisco 20050829: This note should be put first to 3., otherwise it could be
to late. I know one should read first completly, but you know how users
behave ;-)

4. Install the new cyrus21-imapd packages. Make sure no user will try
to connect to imapd/pop3d and that no MTA will try to deliver to lmtpd
until you do step 5.

cyrus21-common [required]
cyrus21-admin [required]
cyrus21-imapd [optional; must have one of imapd or pop3d]
cyrus21-pop3d [optional; must have one of imapd or pop3d]
libcyrus-imap-perl21 [required]

# apt-get install PACKAGE-NAME [PACKAGE_NAME ...]

or use dselect.

5. Stop the cyrmaster process.

# /etc/init.d/cyrus21 stop

5a. Make sure Cyrus won't start until the upgrade process is over.

# cp -f /usr/lib/cyrus/upgrade/cyrus-db-types.upgrading_from_1.5.txt \
/usr/lib/cyrus/cyrus-db-types.active

6. Install the libdb3-util package.

# apt-get install libdb3-util

7. Change to the "cyrus" user.

# /bin/su - cyrus
$

8. Run the rehash program.

$ /usr/lib/cyrus/upgrade/rehash basic

9. Run ctl_mboxlist to update the "mailboxes" file.

$ cd /var/lib/cyrus
$ /usr/sbin/ctl_mboxlist -u < mailboxes

frisco 20050829: no mailboxes-file here (updating from 1.5.19-20 deb) 

10. Run the cyrreconstruct program from the /var/spool/cyrus directory
to reconstruct the mailboxes.

$ cd /var/spool/cyrus
$ /usr/sbin/cyrreconstruct -r user.*

frisco 20050829: This is correct, but it could be worth mentioning why the
user-dir from /var/spool/cyrus/mail/user has vanished (rehash did it,
right?) - it took me some time, but find . -name user then showed me
cyrreconstruct is very fast or does not do anything - no output was given
and it ended immediatly

(you may need to cyrreconstruct other mailboxes, if you have any
system mailboxes or shared mailboxes not in the user hierarchy)

11. Exit the "cyrus" user, back to "root".

$ exit
#

12. Upgrade all of the db2 files used by Cyrus from to db3.
^^
frisco 20050829: from what: -> (see line above) 

# find /var/lib/cyrus -name \*.db -print -exec /usr/bin/db3_upgrade {} \;

frisco 20050829: Seems not to work, output as follows:
root@linux:/# find /var/lib/cyrus -name \*.db -print -exec
/usr/bin/db3_upgrade {} \;
/var/lib/cyrus/mailboxes.db
db_upgrade: /var/lib/cyrus/mailboxes.db: unrecognized file type
db_upgrade: DB->upgrade: /var/lib/cyrus/mailboxes.db: Invalid argument

13. Convert the state databases to those used by new Cyrus 2.1

Read /usr/share/doc/cyrus21-common/README.Debian.database, and follow
whatever steps you need to change the backends from db3 to skiplist.

This step needs some work, if you can send your experiences with it
to hmh@debian.org, I will update this document accordingly.

**** The upgrade of Cyrus' stores are now complete ****

You may want to remove any left-over empty directories from the old version,
and re-run /usr/sbin/cyrus-makedirs just in case you got one of them wrong.

Now, you need to reconfigure the new Cyrus imapd to adequate it to your
system
and SASL requirements. The Cyrus config files are /etc/imapd.conf,
/etc/cyrus.conf and /etc/default/cyrus21.

Depending on your SASL configuration, you may also need to modify
/etc/pam.d/{imap,pop,sieve,lmtp} and other SASL configuration files.

Do not forget to edit /etc/imapd.conf to e.g. set the "admins: cyrus" line
(if
you use "cyrus" as the name for the administrator).

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++



Reply to: