createuser.dotforward 459 B

123456789101112131415
  1. #!/bin/sh
  2. #
  3. # This is an example script which creates a .forward file
  4. # in the home directory of a user, which is being created
  5. # in Kopano. Place this file, with executable rights, in
  6. # /etc/kopano/userscripts/createuser.d/
  7. # if you want a .forward file for delivery for each user.
  8. #
  9. HOMEDIR=`getent passwd $KOPANO_USER | cut -d: -f6`
  10. echo "\"| /usr/sbin/kopano-dagent $KOPANO_USER\"" > $HOMEDIR/.forward
  11. chown $KOPANO_USER.$KOPANO_USER $HOMEDIR/.forward