diff --git a/cyrus-imapd-README.HOWTO-recover-mailboxes.db b/cyrus-imapd-README.HOWTO-recover-mailboxes.db new file mode 100644 index 0000000..b1ab5cc --- /dev/null +++ b/cyrus-imapd-README.HOWTO-recover-mailboxes.db @@ -0,0 +1,31 @@ +With this rpm, you should usually find backups of your mailboxes.db +in /var/lib/imap/backup/. If you don't have them, for any reason, +you can recreate it like this. + +Note: The scripts doesn't care with different hashing schemes of +the mailspool. Adjust as needed! +And please, check the permissions mailboxes.db after creating it. + +#!/bin/sh +# + +# stop cyrus-imapd +service cyrus-imapd stop + +# backup existing mailboxes.db +mv /var/lib/imap/mailboxes.db /var/lib/imap/mailboxes.db.$$ +find /var/spool/imap/?/user -maxdepth 1 -mindepth 1 | \ + while read i; do + echo $(basename $i) + echo "user.$i<\t>default<\t>$i<\t>lrswipcda<\t>cyrus<\t>lrswipcda" >> /tmp/newmboxlist.txt + done + +# we have everyone's base directory in /tmp/newmboxlist.txt, now we +# import the new list +/usr/lib/cyrus-imapd/ctl_mboxlist -u @@ -403,6 +405,7 @@ done %{buildroot}%{_spooldata} \ %{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup} \ %{buildroot}%{_datadir}/%{name}/rpm \ + %{buildroot}%{cyrus_imapd_configdir} \ %{_contribdir} # Install additional files @@ -441,6 +444,12 @@ done %{__install} -m 755 -d doc/conf %{__install} -m 644 %{_confdir}/*.conf doc/conf/ +# create the ghost pem file +touch %{buildroot}%{ssl_pem_file} +# change config file so ssl certificates are under /etc rather than /usr/share +%{__perl} -pi -e 's@/usr/share/ssl/certs/cyrus-imapd.pem@%{ssl_pem_file}@g' %{buildroot}%{_sysconfdir}/imapd.conf + + # Rename 'master' binary and manpage to avoid crash with postfix %{__mv} -f %{buildroot}%{_cyrexecdir}/master %{buildroot}%{_cyrexecdir}/cyrus-master %{__mv} -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8 @@ -522,7 +531,11 @@ fi # Create SSL certificates exec > /dev/null 2> /dev/null -if [ ! -f %{_datadir}/ssl/certs/%{name}.pem ]; then +# if the certificate is only in the old location, move it to the new location +if [ -f %{_datadir}/ssl/certs/%{name}.pem -a ! %{ssl_pem_file} ]; then +mv %{_datadir}/ssl/certs/%{name}.pem %{ssl_pem_file} +fi +if [ ! -f %{ssl_pem_file} ]; then pushd %{_datadir}/ssl/certs umask 077 %{__cat} << EOF | make %{name}.pem @@ -536,6 +549,7 @@ root@localhost.localdomain EOF %{__chown} root.%{_cyrusgroup} %{name}.pem %{__chmod} 640 %{name}.pem +mv %{name}.pem %{ssl_pem_file} popd fi @@ -667,6 +681,8 @@ fi %{_mandir}/man8/* %doc COPYRIGHT README %doc doc/* +%dir %{cyrus_imapd_configdir} +%attr(0640,root,%{_cyrusgroup}) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{ssl_pem_file} %files murder %defattr(0644,root,root,0755) @@ -702,6 +718,10 @@ fi %{_mandir}/man1/* %changelog +* Mon Apr 18 2005 John Dennis - 2.2.12-4.fc4 +- fix bug #141479, move ssl pem file from /usr/share/ssl/certs to /etc/cyrus-imapd/cyrus-imapd.pem +- change license field to BSD, its not exact BSD, but BSD is the closest. + * Fri Apr 15 2005 John Dennis - 2.2.12-3.fc4 - fix release field to be single digit diff --git a/sources b/sources index ee8ff12..2e4c021 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ 70b3bba526a8d36d3bb23a87d37e9188 cyrus-imapd-2.2.12.tar.gz -f3d52a0eb84ec6c8a127cd4c1bc6af7b cyrus-imapd-README.HOWTO-recover-mailboxes.db 8f7a26b0556369827bb5c8084a3e3ea1 cyrus_sharedbackup-0.1.tar.gz