summaryrefslogtreecommitdiff
path: root/Administrator_Guide/en-US/step-select-all-mailboxes.xml
blob: 81715d167e4e5dd352479e6d5009661266009408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE step PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Administrator_Guide.ent">
%BOOK_ENTITIES;
]>
<step>
    <para>
        Use the Cyrus IMAP administrator account to select all mailboxes, to make sure the format upgrade is not taking place while the user is attempting to login / select a mailbox.
    </para>
    <note>
        <para>
            Optionally, enable full so-called telemetry logging:
        </para>
        <para>

<screen># <userinput>mkdir -p /var/lib/imap/log/cyrus-admin</userinput>
# <userinput>chown cyrus:mail /var/lib/imap/log/cyrus-admin</userinput></screen>

        </para>

    </note>

<programlisting language="Bash">#!/bin/bash

kolab lm | while read folder; do
    echo ". SELECT \"${folder}\""
done | \
    imtest -t "" \
        -u ${cyrus_admin} \
        -a ${cyrus_admin} \
        -w "${cyrus_admin_pw}" \
        ${imap_host}</programlisting>
    <para>
        or, alternatively;
    </para>

<programlisting language="Bash">#!/bin/bash

 . ./settings.sh

echo '. LIST "" "*"' | \
    imtest \
        -t "" \
        -u ${cyrus_admin} \
        -a ${cyrus_admin} \
        -w "${cyrus_admin_pw}" \
        ${imap_host} | \

        sed -r \
            -e '/^\* LIST/!d' \
            -e 's/.*\"\/\"\s(.*)/\1/g' \
            -e 's/^"//g' \
            -e 's/"$//g' \
            -e 's/\s*\r*\n*$//g' | \

        while read folder; do
            echo ". SELECT \"${folder}\""
        done | \
            imtest -t "" \
                -u ${cyrus_admin} \
                -a ${cyrus_admin} \
                -w "${cyrus_admin_pw}" \
                ${imap_host}</programlisting>
    <para>
        On your console display, you will see some errors stating <emphasis>NO Permission Denied</emphasis>. These errors you can ignore.
    </para>
    <para>
        You'll see messages such as the following appear in <filename>/var/log/maillog</filename>:
    </para>
    <para>

<screen>Aug  8 16:40:10 kolab imap[4644]: Index upgrade: example.org!shared.lists.example^org.memo (10 -&gt; 12)
Aug  8 16:40:10 kolab imap[4644]: seen_db: user cyrus-admin opened /var/lib/imap/user/c/cyrus-admin.seen</screen>

    </para>

</step>