Page 1 of 1

Scalix plugin Change user mailnode in SAC.

Posted: Fri Jun 06, 2008 6:06 am
by nuno.mesquita

Code: Select all

#!/bin/bash
#
# Nuno Mesquita.
#

help() {
   echo ""
   echo ""
   echo "VERSION:"
   echo "1.0"
   echo ""
   echo "NAME:"
   echo "Change User MailNode"
   echo ""
   echo "DESCRIPTION:"
   echo ""
   echo "ommodu changes user attributes."
   echo "PARAMETERS:"
   echo "-u   User      string   single   User Name"
   echo "-n    New Mailnode       string   single   New Mailnode of the User"
   echo "-a   AuthenticationID      string   single   User Authentication ID"
   echo "--help   Help   \"\"   \"\"   \"\"   Usage Information"
   echo ""
   echo "OUTPUT:"
   echo ""
   echo "text/plain"
}
#
# main script
#

declare params
declare authenticationid
declare Newmailnode
declare user
params=""
authenticationid=""
Newmailnode=""
user=""

while [ "$1" != "" ]; do
   case "$1" in
      --help) help;
                    exit 0
         shift;;
      -u) user="$2";
            shift;;
      -n) Newmailnode="$2";
                shift;;
      -a) authenticationid="$2";
            shift;;
      *) params="$params $1 $2";
                shift;;
   esac
   shift
done

/opt/scalix/bin/omshowu -n "$user" > /dev/null

if [ "$?" = "0" ];  then
   echo "/opt/scalix/bin/ommodu -o "$user/$Newmailnode" $authenticationid"
   /opt/scalix/bin/ommodu -n "$user/$Newmailnode" $authenticationid
  fi

exit 0

Posted: Thu Sep 04, 2008 10:04 am
by hafiz
nuno.mesquita,

thanks for the script! works great!

Re: Scalix plugin Change user mailnode in SAC.

Posted: Thu Aug 06, 2009 2:36 pm
by jaydenrussell
I can't seem to implement this script. Its added but I have no selection of users on scalix 11.4.4