summaryrefslogtreecommitdiffstats
path: root/gpglib/webgpg.in
diff options
context:
space:
mode:
authorSam Varshavchik2013-08-19 16:39:41 -0400
committerSam Varshavchik2013-08-25 14:43:51 -0400
commit9c45d9ad13fdf439d44d7443ae75da15ea0223ed (patch)
tree7a81a04cb51efb078ee350859a64be2ebc6b8813 /gpglib/webgpg.in
parenta9520698b770168d1f33d6301463bb70a19655ec (diff)
downloadcourier-libs-9c45d9ad13fdf439d44d7443ae75da15ea0223ed.tar.bz2
Initial checkin
Imported from subversion report, converted to git. Updated all paths in scripts and makefiles, reflecting the new directory hierarchy.
Diffstat (limited to 'gpglib/webgpg.in')
-rw-r--r--gpglib/webgpg.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/gpglib/webgpg.in b/gpglib/webgpg.in
new file mode 100644
index 0000000..c2cc962
--- /dev/null
+++ b/gpglib/webgpg.in
@@ -0,0 +1,39 @@
+#! @SHELL@
+#
+#
+# Copyright 2001 Double Precision, Inc. See COPYING for
+# distribution information.
+#
+# This scripts initializes Maildir/gpg, enabling GPG code for the given
+# maildir.
+
+GPG=@GPG@
+
+maildir="$1"
+
+# Sanity check
+
+test ! -d "$maildir" && echo "$maildir: not a directory" >&2 && exit 1
+
+umask 077
+test -d "$maildir/gpg" && echo "$maildir/gpg: already exists" >&2 && exit 1
+test -f "$maildir/gpg/options" && echo "$maildir/gpg/options: already exists" >&2 && exit 1
+
+mkdir $maildir/gpg || exit 1
+cat >$maildir/gpg/options <<EOF
+
+force-v3-sigs
+escape-from-lines
+lock-once
+comment ""
+no-secmem-warning
+
+EOF
+
+owner=`@PERL@ -e '@a=stat "'$maildir'"; print "$a[4]:$a[5]";'`
+
+chown -R $owner $maildir/gpg
+
+echo "$maildir/gpg/options created, please verify that the options are correct."
+
+echo "See INSTALL for more information."