File indexing completed on 2025-01-05 04:58:37
0001 #!/bin/bash 0002 0003 echo "cm user.doe" | cyradm --auth PLAIN -u cyrus -w admin localhost 0004 0005 sudo echo "sam user.doe.* cyrus c; 0006 dm user.doe.*; 0007 cm user.doe.test; 0008 cm user.doe.Drafts; 0009 cm user.doe.Trash; 0010 sam user.doe cyrus c; 0011 " | cyradm --auth PLAIN -u cyrus -w admin localhost 0012 0013 sudo echo "sam user.doe.* cyrus c; 0014 subscribe INBOX.test; 0015 subscribe INBOX.Drafts; 0016 subscribe INBOX.Trash; 0017 " | cyradm --auth PLAIN -u doe -w doe localhost 0018 0019 #Create a bunch of test messages in the test folder 0020 # for i in `seq 1 5000`; 0021 # do 0022 # # sudo cp /src/sink/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain\:2\,S /var/spool/imap/d/user/doe/test/$i. 0023 # done 0024 # Because this is way faster than a loop 0025 FOLDERPATH=/var/spool/imap/d/user/doe/test 0026 sudo mkdir $FOLDERPATH 0027 SRCMESSAGE=/src/sink/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain\:2\,S 0028 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{1..1000}. 0029 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{1001..2000}. 0030 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{2001..3000}. 0031 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{3001..4000}. 0032 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{4001..5000}. 0033 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{5001..6000}. 0034 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{6001..7000}. 0035 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{7001..8000}. 0036 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{8001..9000}. 0037 sudo tee <$SRCMESSAGE >/dev/null $FOLDERPATH/{9001..10000}. 0038 0039 sudo chown -R cyrus:mail $FOLDERPATH 0040 sudo reconstruct "user.doe.test"