summaryrefslogtreecommitdiff
path: root/upgrade-to-3.0-native-from-2.3-openpkg/21-select-all-mailboxes.sh
blob: fb0e293877f16411cd4b29693f7f3a739b86d871 (plain)
1
2
3
4
5
6
7
8
9
10
#!/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/\s*\r*\n*$//g' -e 's/"$//g' | while read folder; do

    echo ". SELECT \"${folder}\""

done | imtest -t "" -u ${cyrus_admin} -a ${cyrus_admin} -w "${cyrus_admin_pw}" ${imap_host}