X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=local%2Fdovecot-user-add;h=8601fe6c71bc2439c33c7840a687d6becbc20fed;hp=5e9c35f02cd493edaa563053d1aac4d806a8215a;hb=8e632f43794c0db9d02a4e3df0ca2eaaac09def2;hpb=b0da1a3b6963f3f6d7611770c8798f8dd7cac7d4 diff --git a/local/dovecot-user-add b/local/dovecot-user-add index 5e9c35f..8601fe6 100755 --- a/local/dovecot-user-add +++ b/local/dovecot-user-add @@ -16,8 +16,8 @@ first_valid_gid=30000 IFS=@ read -r user domain <<-EOF $1 EOF -test "${user:+set"}" -test "${domain:+set"}" +test "${user:+set}" +test "${domain:+set}" shift # setup_nss @@ -46,7 +46,7 @@ shift sudo chmod -t ~mail/acl/dovecot."$domain" # NOTE: permet les mv shared.db{.lock,} effectués par dovecot - sudo install -d -o mail -g php5_roundcube -m 1770 \ + sudo install -d -o mail -g php_roundcube -m 1770 \ /etc/dovecot/dovecot."$domain" sudo install -d -o mail -g postfix -m 750 \ /etc/mail/dovecot @@ -161,6 +161,8 @@ shift sudo install -d -o "$uid" -g "$gid" -m 2770 \ "$home" \ "$home"/Maildir + sudo install -d -o "$uid" -g "$gid" -m 2770 \ + "$home"/Maildir/.Trash sudo install -d -o "$uid" -g "$gid" -m 0700 \ "$home"/acl.d \ "$home"/sieve.d @@ -201,5 +203,5 @@ shift !! EOF sort -k 1,1 -t : | - sudo install -o php5_roundcube -g php5_roundcube -m 0640 /dev/stdin "$new_passwd" + sudo install -o php_roundcube -g php_roundcube -m 0640 /dev/stdin "$new_passwd" sudo mv -f "$new_passwd" "$old_passwd"