X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/blobdiff_plain/d55e284420c1fc41a273d8219f94ecc3471b6755..739364a225702073f38fb5739089db702dace4d9:/create-user diff --git a/create-user b/create-user index ccd65e7..15ce41a 100755 --- a/create-user +++ b/create-user @@ -198,7 +198,7 @@ test -e $HOMEPATH/.domtool || \ # Gitweb hosting test -L /var/cache/git/$USER || \ - ln -s $HOMEPATH/.hcoop-git /var/cache/git/$USER + sudo ln -s $HOMEPATH/.hcoop-git /var/cache/git/$USER # MAIL VOLUME vos examine mail.$USER 2>/dev/null || \ @@ -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 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 @@ -308,3 +295,9 @@ mire_and_deleuze sudo chmod ug=rwx,o= /var/lock/apache2/dav/$USER # domtool-adduser $USER + +# +# Subscribe user to our mailing lists. +# +echo $USER@hcoop.net | sudo -u list \ + /var/lib/mailman/bin/add_members -r - hcoop-announce