annotate src/director/director-test.sh @ 23017:c1d36f2575c7 default tip

lib-imap: Fix "Don't accept strings with NULs" cherry-pick
author Timo Sirainen <timo.sirainen@open-xchange.com>
date Thu, 29 Aug 2019 09:55:25 +0300
parents 4ed6a9d7c232
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #!/bin/sh
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2
19955
4ed6a9d7c232 director: Small improvements to director-test.sh
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 16620
diff changeset
3 director_count=10
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 echo "Add to /etc/hosts:"
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6
13808
3027626f7239 director-test.sh script fixed to use a working path for director-test binary.
Timo Sirainen <tss@iki.fi>
parents: 13045
diff changeset
7 curpath=`pwd`
3027626f7239 director-test.sh script fixed to use a working path for director-test binary.
Timo Sirainen <tss@iki.fi>
parents: 13045
diff changeset
8
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 hosts=""
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10 dirs=""
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 i=0
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 while [ $i != $director_count ]; do
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 i=`expr $i + 1`
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 dirs="$dirs 127.0.1.$i"
13045
79f9dce5d5fd director: Added support for moving user to another server with "doveadm director move".
Timo Sirainen <tss@iki.fi>
parents: 11629
diff changeset
15 echo "127.0.1.$i director"
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
16 cat > dovecot-director$i.conf <<EOF
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
17 listen = 127.0.1.$i
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
18 base_dir = /var/run/dovecot$i
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
19
11629
a07aa85f68c9 director: Lots of fixes. It should be pretty stable now.
Timo Sirainen <tss@iki.fi>
parents: 11583
diff changeset
20 !include dovecot-director-common.conf.inc
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21 EOF
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 done
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23
11629
a07aa85f68c9 director: Lots of fixes. It should be pretty stable now.
Timo Sirainen <tss@iki.fi>
parents: 11583
diff changeset
24 cat > dovecot-director-common.conf.inc <<EOF
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 log_path = /var/log/dovecot.log
19955
4ed6a9d7c232 director: Small improvements to director-test.sh
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 16620
diff changeset
26 info_log_path = /var/log/dovecot-info.log
4ed6a9d7c232 director: Small improvements to director-test.sh
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 16620
diff changeset
27 log_timestamp = "%b %d %H:%M:%S.%{usecs} "
4ed6a9d7c232 director: Small improvements to director-test.sh
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 16620
diff changeset
28
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 director_servers =$dirs
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 director_mail_servers = 127.0.0.1-127.0.0.255
16620
366024103c09 director: Fixes to director-test.
Timo Sirainen <tss@iki.fi>
parents: 13808
diff changeset
31 director_user_expire = 15s
13045
79f9dce5d5fd director: Added support for moving user to another server with "doveadm director move".
Timo Sirainen <tss@iki.fi>
parents: 11629
diff changeset
32 disable_plaintext_auth = no
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
34 ssl = no
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
35 service director {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36 executable = director -D -t 9091
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37 user = root
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
38 unix_listener login/director {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
39 mode = 0666
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
40 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
41 fifo_listener login/proxy-notify {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
42 mode = 0666
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
43 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
44 inet_listener {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
45 port = 9090
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
46 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
47 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
48 service imap-login {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
49 executable = imap-login -D director
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
50 service_count = 0
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
51 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
52
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
53 passdb {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
54 driver = static
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
55 args = proxy=y nopassword=y port=14300
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
56 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
57 EOF
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
58
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
59 cat > dovecot-test.conf <<EOF
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
60 protocols = imap
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
61 ssl = no
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
62
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
63 log_path = /var/log/dovecot.log
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
64 info_log_path = /var/log/dovecot-access.log
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
65
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
66 service imap-login {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
67 inet_listener imap {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
68 port = 0
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
69 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
70 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
71 service director-test {
13808
3027626f7239 director-test.sh script fixed to use a working path for director-test binary.
Timo Sirainen <tss@iki.fi>
parents: 13045
diff changeset
72 executable = $curpath/director-test /var/run/dovecot1/director-admin
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
73 process_limit = 1
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
74
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
75 inet_listener {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
76 port = 14300
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 inet_listener {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
79 port = 9091
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
81 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
82
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
83 passdb {
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
84 driver = static
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
85 args = nopassword=y
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
86 }
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
87 EOF
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
88
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
89 echo
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
90 echo "Start up dovecot instances:"
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
91 echo
11629
a07aa85f68c9 director: Lots of fixes. It should be pretty stable now.
Timo Sirainen <tss@iki.fi>
parents: 11583
diff changeset
92 echo 'for conf in dovecot*.conf; do dovecot -c $conf; done'
11582
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
93 echo
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
94 echo "Start testing:"
fb917e3a8f07 director-test: Added a script that generates test config files and other necessary info.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
95 echo
16620
366024103c09 director: Fixes to director-test.
Timo Sirainen <tss@iki.fi>
parents: 13808
diff changeset
96 echo "imaptest host=director user=test%d.%d - select=0 no_tracking clients=1000"