File: createuser.dotforward

package info (click to toggle)
kopanocore 8.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 15,400 kB
  • sloc: cpp: 175,422; python: 24,623; perl: 7,319; php: 6,056; sh: 2,172; makefile: 1,294; xml: 45; ansic: 1
file content (14 lines) | stat: -rwxr-xr-x 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

#
# This is an example script which creates a .forward file
# in the home directory of a user, which is being created
# in Kopano. Place this file, with executable rights, in
# /etc/kopano/userscripts/createuser.d/
# if you want a .forward file for delivery for each user.
#

HOMEDIR=`getent passwd $KOPANO_USER | cut -d: -f6`

echo "\"| /usr/sbin/kopano-dagent $KOPANO_USER\"" > $HOMEDIR/.forward
chown $KOPANO_USER.$KOPANO_USER $HOMEDIR/.forward