create-user: Send nice introductory email, remove commented-out cruft
authormwolson_admin <mwolson_admin@deleuze.hcoop.net>
Sun, 9 Dec 2007 00:38:05 +0000 (19:38 -0500)
committermwolson_admin <mwolson_admin@deleuze.hcoop.net>
Sun, 9 Dec 2007 00:38:05 +0000 (19:38 -0500)
create-user

index d4e3d59..15ce41a 100755 (executable)
@@ -210,6 +210,15 @@ chown $USER:nogroup $MAILPATH
 chown $USER:nogroup $HOMEPATH/Maildir
 fs sa $MAILPATH $USER        all
 fs sa $MAILPATH $USER.daemon all
+if test ! -e $MAILPATH/new; then
+    mkdir -p $MAILPATH/cur $MAILPATH/new $MAILPATH/tmp
+    echo -e "This email account is provided as a service for HCoop members." \
+        "\n\nTo learn how to use it, please visit the page" \
+        "\n<http://wiki2.hcoop.net/MemberManual/Email> on our website."| \
+        mail -s "Welcome to your HCoop email store" \
+            -e -a "From: postmaster@hcoop.net" \
+            real-$USER
+fi
 
 # Set up shared SpamAssassin folder
 if test -f $HOMEPATH/Maildir/shared-maildirs; then
@@ -221,28 +230,6 @@ if test -f $HOMEPATH/Maildir/shared-maildirs; then
             's!^(SpamAssassin  )/home/spamd!\1/var/local/lib/spamd!1' \
             $file
     fi
-
-# This does not yet seem to be needed, and it triggers an AFS issue,
-# so I've commented it out --mwolson.
-#
-#     NOTIFY=no
-#     for dir in $HOMEPATH/Maildir/shared-folders/SpamAssassin/*; do
-#         if ! test -d $dir; then
-#             NOTIFY=yes
-#         else
-#             dest=/var/local/lib/spamd/Maildir/.$(basename $dir)
-#             if test "$(readlink $dir/shared)" != "$dest"; then
-#                 ln -sf $dest $dir/shared
-#             fi
-#         fi
-#     done
-#     if test $NOTIFY = yes; then
-#         # This is probably going overboard, but oh well
-#         echo "$USER needs assistance on their shared spam dir" | \
-#             pagsh -c mail -s "[create-user] $USER needs assistance" \
-#               -e -a "From: admins@deleuze.hcoop.net" mwolson_admin
-#     fi
-
 else
     maildirmake --add SpamAssassin=/var/local/lib/spamd/Maildir \
         $HOMEPATH/Maildir