beginner's unluck

websrvr websrvr at macftphttp.serverbox.org
Thu Jun 23 18:42:35 EDT 2005


On Jun 23, 2005, at 04:47 PM, Gordon Thagard wrote:

> Timo Schoeler wrote:
>
>
>> thus Gordon Thagard spake:
>>
>>
>>> Solaris 9
>>> Postfix 2.2.2
>>> Cyrus-SASL 2.1.20
>>> Cyrus-IMAP 2.2.12
>>>
>>>
>>> Hi, I have Cyrus-IMAP running on a box but I'm getting some  
>>> errors. Can
>>> someone please tell me which direction to go with these symptoms?
>>>
>>> Jun 23 14:07:16 horus master[29531]: [ID 392559 local6.debug]  
>>> about to
>>> exec /opt/cyrus-imap/bin/ctl_cyrusdb
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 702911 local6.notice]
>>> checkpointing cyrus databases
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 854764 local6.error]
>>> DBERROR: error listing log files: Permission denied
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 686478 local6.error]
>>> DBERROR: archive /var/imap/db: cyrusdb error
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 578205 local6.debug]
>>> archiving database file: /var/imap/annotations.db
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 854764 local6.error]
>>> DBERROR: error listing log files: Permission denied
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 686478 local6.error]
>>> DBERROR: archive /var/imap/db: cyrusdb error
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 578205 local6.debug]
>>> archiving database file: /var/imap/mailboxes.db
>>> Jun 23 14:07:16 horus ctl_cyrusdb[29531]: [ID 127214  
>>> local6.notice] done
>>> checkpointing cyrus databases
>>> Jun 23 14:07:16 horus master[17383]: [ID 310780 local6.debug]  
>>> process
>>> 29531 exited, status 0
>>>
>>> The master process is running as user 'cyrus' and ownership of
>>> /var/imap/* is set to 'cyrus:mail'. Also, I'm using pwcheck as it  
>>> was
>>> the only way I could get Postfix to authenticate correctly. Sadly,
>>> Cyrus-IMAP doesn't like this and is giving me unknown user errors. I
>>> want it to authenticate via NIS.
>>>
>>> Any and all assistance is greatly appreciated.
>>>
>>> Cheers,
>>>
>>> Gordon Thagard

This may help...


#!/bin/sh
#
# /usr/sbin/reconstruct_imap_db
#

# Configuration Variables
the_imap=/var/imap
the_user="cyrus"
the_group="mail"
recon_path=/usr/bin/cyrus/bin/reconstruct

case $TERM in
     #   for the most important terminal types we directly know the  
sequences
     xterm|xterm*|vt220|vt220*)
         bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </ 
dev/null 2>/dev/null`
         norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/ 
null 2>/dev/null`
         ;;
     vt100|vt100*|cygwin)
         bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109,  
0, 0); }' </dev/null 2>/dev/null`
         norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0,  
0); }' </dev/null 2>/dev/null`
         ;;
esac

if [ `whoami` != "root" ]; then
cat <<X

$0 must be run as ${bold}root${norm} user.

X
exit
fi

do_cmd=false;

while test $# -gt 0; do
     if test "$1" = "--force" -o "$1" = "-f"; then
         do_cmd=true
     fi
     shift
done
if test "$do_cmd" != true; then
cat    <<X

use "${bold}$0 --force${norm}" or "${bold}$0 -f${norm}" to perform  
the repair.

X
else
cat <<X

${bold}Reconstructing${norm} the mail database.

X
echo "Stoping mail"
serveradmin stop mail
if [ -d /var/imap.old ]; then    rm -rf /var/imap.old; fi
echo "Moving database: ${the_imap} -> ${the_imap}.old"
mv /var/imap /var/imap.old
echo "Making new database: -> ${the_imap}"
mkdir /var/imap
/usr/bin/cyrus/tools/mkimap
echo "Fixing permissions: -> "
chown -R ${the_user}:${the_user} /var/imap
echo "Reconstructing the database: -> ${the_imap}"
sudo -u ${the_user} ${recon_path} -i
echo "Starting mail"
serveradmin start mail
cat <<X

If you see no errors it completed succcessfully.

X
fi

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list