diff --git a/config.docker-dev/testdav.sh b/config.docker-dev/testdav.sh
new file mode 100755
index 00000000..c5cfce97
--- /dev/null
+++ b/config.docker-dev/testdav.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -e
+
+trap 'echo "Error on $LINENO"' ERR
+
+USER="admin@kolab.local"
+PASSWORD="simple123"
+CREDENTIALS="$USER:$PASSWORD"
+DAVSERVER="http://localhost:7081/dav"
+
+USER_FRONTEND_COMMAND="imtest -p 7143 -a $USER -u $USER -w $PASSWORD -v 127.0.0.1"
+USER_BACKEND_COMMAND="imtest -p 8143 -a $USER -u $USER -w $PASSWORD -v 127.0.0.1"
+
+# We just connect to a backend to make sure the inbox is created
+echo 'a01 list "" "*"' | $USER_BACKEND_COMMAND > /dev/null 2>&1
+
+
+# This is supposed to create the calendar
+curl -u $CREDENTIALS -i -X PROPFIND -H 'Depth: 1' "$DAVSERVER/principals/user/$USER/" | grep "HTTP/1.1 207 Multi-Status"
+
+curl -u $CREDENTIALS -sD /dev/stderr -H "Content-Type: application/xml" -X PROPFIND -H "Depth: infinity" --data '<d:propfind xmlns:d="DAV:" xmlns:cs="https://calendarserver.org/ns/"><d:prop><d:resourcetype /><d:displayname /></d:prop></d:propfind>' "$DAVSERVER/calendars/user/$USER" | grep "<d:status>HTTP/1.1 200 OK</d:status>"
+
+# Test a PUT
+curl --user "$CREDENTIALS" -X PUT $DAVSERVER/calendars/user/$USER/Default/VYM30SH4VNJFV4CWAUC0V10.ics -H "Content-Type: text/calendar ; charset=utf-8" -T /dev/stdin <<-EOF
+BEGIN:VCALENDAR
+PRODID:-//My own caldav script
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+CREATED:20190606T094245
+DTSTAMP:20190606T094245
+LAST-MODIFIED:20190606T094245
+UID:VYM30SH4VNJFV4CWAUC0V92310
+SUMMARY:Test added using cURL !
+CLASS:PUBLIC
+STATUS:CONFIRMED
+DTSTART;TZID=Europe/Zurich:20190606T200000
+DTEND;TZID=Europe/Zurich:20190606T210000
+END:VEVENT
+BEGIN:VTIMEZONE
+TZID:Europe/Zurich
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
+END:STANDARD
+END:VTIMEZONE
+END:VCALENDAR
+EOF
+
+# List the event
+curl --user "$CREDENTIALS" -sD /dev/stderr -H "Content-Type: application/xml" -X PROPFIND -H "Depth: infinity" $DAVSERVER/calendars/user/$USER/Default/ | xmllint -format - | grep "<D:href>/dav/calendars/user/admin@kolab.local/Default/VYM30SH4VNJFV4CWAUC0V10.ics</D:href>"
diff --git a/config.docker-dev/testimap.sh b/config.docker-dev/testimap.sh
old mode 100644
new mode 100755
index c34a0421..43ac142b
--- a/config.docker-dev/testimap.sh
+++ b/config.docker-dev/testimap.sh
@@ -1,56 +1,62 @@
 #!/bin/bash
 
 set -e
 
 trap 'echo "Error on $LINENO"' ERR
 
 ADMIN_USER="cyrus-admin"
 ADMIN_PASSWORD="Welcome2KolabSystems"
 USER="admin@kolab.local"
 PASSWORD="simple123"
-CREDENTIALS="$USER:$PASSWORD"
 
+USER_FRONTEND_COMMAND="imtest -p 7143 -a $USER -u $USER -w $PASSWORD -v 127.0.0.1"
+USER_BACKEND_COMMAND="imtest -p 8143 -a $USER -u $USER -w $PASSWORD -v 127.0.0.1"
 ADMIN_FRONTEND_COMMAND="imtest -p 7143 -a $ADMIN_USER -u $ADMIN_USER -w $ADMIN_PASSWORD -v 127.0.0.1"
 ADMIN_BACKEND1_COMMAND="imtest -p 8143 -a $ADMIN_USER -u $ADMIN_USER -w $ADMIN_PASSWORD -v 127.0.0.1"
 ADMIN_BACKEND2_COMMAND="imtest -p 9143 -a $ADMIN_USER -u $ADMIN_USER -w $ADMIN_PASSWORD -v 127.0.0.1"
 
 
 # We expect to be able to create folders under the shared/ prefix from multiple backends.
 # This only works because of a hardcoded exception, as folder hierarchies are not normally allowed to span backends.
 echo 'a01 create shared/test1@kolab.local' | $ADMIN_BACKEND1_COMMAND
 echo 'a01 create shared/test2@kolab.local' | $ADMIN_BACKEND1_COMMAND
 echo 'a01 create shared/test3@kolab.local' | $ADMIN_BACKEND2_COMMAND
 echo 'a01 create shared/test4@kolab.local' | $ADMIN_BACKEND2_COMMAND
 echo 'a01 create shared/test5@kolab.local' | $ADMIN_FRONTEND_COMMAND
 
 # Make sure no shared folder was created
 docker compose exec -ti imap-mupdate ctl_mboxlist -d | grep -v '"shared":' > /dev/null 2>&1
 
 # Make sure the folders exist
 echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND | grep "shared/test1@kolab.local"
 echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND | grep "shared/test2@kolab.local"
 echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND | grep "shared/test3@kolab.local"
 echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND | grep "shared/test4@kolab.local"
 echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND | grep "shared/test5@kolab.local"
 
-# echo 'a01 list "" "*"' | imtest -p 7143 -a $USER -u $USER -w $PASSWORD -v 127.0.0.1
-# echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND
 
+# Test getmetadata/setmetadata on a shared folder
+echo 'a01 setmetadata shared/test1@kolab.local (/shared/vendor/kolab/folder-type "event")' | $ADMIN_FRONTEND_COMMAND | grep "a01 OK Completed"
+echo 'a01 getmetadata (DEPTH infinity) shared/test1@kolab.local (/shared/vendor/kolab/folder-type)' | $ADMIN_FRONTEND_COMMAND | grep 'METADATA shared/test1@kolab.local ("/shared/vendor/kolab/folder-type" "event")'> /dev/null 2>&1
+# Also test requesting multiple items
+echo 'a01 getmetadata (DEPTH infinity) shared/test1@kolab.local (/shared/vendor/kolab/folder-type /private/vendor/kolab/folder-type)' | $ADMIN_FRONTEND_COMMAND | grep 'METADATA shared/test1@kolab.local ("/shared/vendor/kolab/folder-type" "event" "/private/vendor/kolab/folder-type" NIL)'> /dev/null 2>&1
 
-# echo 'a01 list "" "*"' | $ADMIN_FRONTEND_COMMAND
-# docker compose exec -ti imap-mupdate ctl_mboxlist -d | grep '"shared":'
-# echo 'a01 setacl shared anyone +x' | $ADMIN_FRONTEND_COMMAND  > /dev/null 2>&1
-# echo 'a01 delete shared' | $ADMIN_FRONTEND_COMMAND > /dev/null 2>&1
-# echo 'a01 setacl shared/test4@kolab.local anyone +x' | $ADMIN_FRONTEND_COMMAND > /dev/null 2>&1
-# echo 'a01 delete shared/test4@kolab.local' | $ADMIN_FRONTEND_COMMAND > /dev/null 2>&1
-# # docker compose exec -ti imap-mupdate ctl_mboxlist -d
 
-# # cyradm --user cyrus-admin --password $(awk '/mupdate_password/ {print $2}' /etc/imapd.conf)  --authz cyrus-admin localhost
 
-# # curl -u $CREDENTIALS -i -X PROPFIND -H 'Depth: 1' $DAVSERVER/principals/user/$USER/
-
-# # curl --user "$CREDENTIALS" -sD /dev/stderr -H "Content-Type: application/xml" -X PROPFIND -H "Depth: infinity" --data '<d:propfind xmlns:d="DAV:" xmlns:cs="https://calendarserver.org/ns/"><d:prop><d:resourcetype /><d:displayname /></d:prop></d:propfind>' $DAVSERVER/principals/user/$USER/
-# # | xmllint -format -
-
-# # curl --user "$CREDENTIALS" -sD /dev/stderr -H "Content-Type: application/xml" -X PROPFIND -H "Depth: infinity" --data '<d:propfind xmlns:d="DAV:" xmlns:cs="https://calendarserver.org/ns/"><d:prop><d:resourcetype /><d:displayname /></d:prop></d:propfind>' $DAVSERVER/calendars/user/$USER/ | xmllint -format -
+# docker compose exec -ti webapp ./artisan scalpel:user:create --id=3 --email=john@kolab.local --password=simple123 --status=3
+# $USER_FRONTEND_COMMAND
+# We must login via IMAP first, to create the INBOX.
+echo 'a01 list "" "*"' | $USER_BACKEND_COMMAND > /dev/null 2>&1
+# Ensure the inbox is created
+docker compose exec -ti imap-mupdate ctl_mboxlist -d | grep '"kolab.local!user.admin":' > /dev/null 2>&1
 
+#TODO as  a user, all of those
+# /home/mollekopf/bin/scripts/imapcli.rb delete --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER || true
+# /home/mollekopf/bin/scripts/imapcli.rb create --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER
+# /home/mollekopf/bin/scripts/imapcli.rb subscribe --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER
+# /home/mollekopf/bin/scripts/imapcli.rb setmetadata --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER "/shared/vendor/kolab/folder-type" event
+# /home/mollekopf/bin/scripts/imapcli.rb getmetadata --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER "/shared/*"
+# /home/mollekopf/bin/scripts/imapcli.rb getmetadata --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER "/shared/vendor/kolab/folder-type"
+# /home/mollekopf/bin/scripts/imapcli.rb lsub --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER
+# /home/mollekopf/bin/scripts/imapcli.rb list --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER
+# /home/mollekopf/bin/scripts/imapcli.rb delete --host $HOST --port 993 --username "$USERNAME" --password "$PASSWORD" --ssl --debug $FOLDER