]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/paks/cyrusimap/install.sh
HinzugefĆ¼gt:
[ipfire-2.x.git] / src / paks / cyrusimap / install.sh
index 3a9ce551bfec4c48fea6d4d5c4ef4b35eb5d518c..11b2c421a8a92645b21985ac88bd0af3c78b0207 100644 (file)
@@ -6,6 +6,22 @@
 #                                                               #
 #################################################################
 #
+CONFIGDIR=/var/ipfire/cyrusimap
+#
 # Extract the files
 tar xfz files.tgz -C /
 cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2
+
+
+
+if [ ! -f $CONFIGDIR/server.pm ]; then
+       cd /tmp && openssl req -new -nodes -out req.pem -keyout key.pem
+       cd /tmp && openssl rsa -in key.pem -out new.key.pem
+       cd /tmp && openssl x509 -in req.pem -out ca-cert -req -signkey new.key.pem -days 999
+       
+       cd /tmp && cp new.key.pem $CONFIGDIR/server.pem
+       cd /tmp && rm new.key.pem
+       cd /tmp && cat ca-cert >> $CONFIGDIR/server.pem
+       chown cyrus:mail $CONFIGDIR/server.pem
+       chmod 600 $CONFIGDIR/server.pem # Your key should be protected
+fi