Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Calendar delegation & recieving invites

  1. #1
    vandehey is offline Senior Member
    Join Date
    Mar 2007
    Posts
    73
    Rep Power
    8

    Default Calendar delegation & recieving invites

    Hello, I am wanting to see how others deal with calendar delegations. If you have an administrative assistant working for you, has anyone found any tricks to make this smooth? I know that you can give the assistant 'admin' or 'manage' privileges to the boss calendar. But, the assistant does not receive copies of these invites when the boss is invited. What I am looking for, is the feature in exchange that is "Delegate receives copies of meeting-related messages sent to me".

    This seems to be a missing piece for us in our zimbra intallation. We have a workaround to forward any calendar event to the assistant (this has it's own problems). Without these emails, it's kinda difficult for an assistant to act on invites promptly. Has anyone found any tricks or workarounds to make this more 'exchange like'?

    -Jeff

  2. #2
    vandehey is offline Senior Member
    Join Date
    Mar 2007
    Posts
    73
    Rep Power
    8

    Default

    Thanks for the reply, I have voted for that bug. The forwarding rule is OK, but causes a problem. When the assistant receives the forwarded invite and accepts it, it places the event on the assistant's calendar as well. An un-wanted side effect. We are on 4.5.11 now, upgrading to 5 soon. I have found a work around that is a bit better in 5. The boss creates a shared folder, and a rule that puts all calendar events in the shared folder. The assistant views this shared folder, and accepts/declines from here. Doing this does not put the event on the assistant calendar, which is a good thing.

  3. #3
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Quote Originally Posted by vandehey View Post
    I have found a work around that is a bit better in 5. The boss creates a shared folder, and a rule that puts all calendar events in the shared folder. The assistant views this shared folder, and accepts/declines from here. Doing this does not put the event on the assistant calendar, which is a good thing.
    Does anyone know what this rule would look like? It occurred to me to filter on "The following is a new meeting request:" in the message body, but I don't think that appears in all invitations (e.g. if sent from iCal).

  4. #4
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    body include BEGIN:VCALENDAR would be one way.

  5. #5
    vandehey is offline Senior Member
    Join Date
    Mar 2007
    Posts
    73
    Rep Power
    8

    Default

    Quote Originally Posted by ewilen View Post
    Does anyone know what this rule would look like? It occurred to me to filter on "The following is a new meeting request:" in the message body, but I don't think that appears in all invitations (e.g. if sent from iCal).
    Yes. The filter criteria should be (if ANY criteria are met):

    body CONTAINS meeting.ics
    body CONTAINS text/calendar

    This will catch calendar invites from both Outlook at ZWC.

  6. #6
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Thanks to both of you. I'd already hit upon

    body CONTAINS Content-Type: text/calendar

    and I was pairing it with

    body CONTAINS method=REQUEST

    as well as a separate filter for method=CANCEL

    The idea being to look for multiple indicators so as to avoid incorrect filing. I will have to test further to make sure I catch everything from Outlook, ZWC, and iCal, but I have been able to confirm that vandehey's method works perfectly. I.e., if an invite appears in the boss's shared folder, the assistant only has to click Accept to approve the appointment on the boss's shared calendar.

    I'll also have to do some testing to see if this will work when the assistant is using Outlook or iCal.

  7. #7
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Okay, based on some reading of the RFCs, I think this will capture any meeting-related message from any source (even Google Calendar), with a fairly low chance of capturing anything else.

    Code:
    If ALL of the following conditions are met:
    
    Body contains Content-Type: text/calendar
    Body contains method=
    Body contains METHOD:
    Body contains VEVENT
    Body contains VCALENDAR
    
    Perform the following actions:
    
    File into Folder <folder_name>
    I'll test in the morning with the "assistant" using various clients.

  8. #8
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    Another busy day but I was able to test with the "assistant" using Outlook, and it works.

    Now I'd like to write a shell script, say zmdelegate.sh <boss_account> <assistant_account>. This is the logic and some of the relevant zimbra commands--if anyone beats me to writing the script I won't cry.

    Steps:

    Verify <boss_account> and <assistant_account> exist on the server
    Make sure Meeting Notifications Folder doesn't already exist; if it does, then exit.
    Create Meeting Notifications Folder
    Share Meeting Notifications Folder and Calendar to assistant R/W
    Make sure that mountpoint names on assistant's account don't already exist
    Accept shares by assistant (only for web interface; Outlook must be done at the workstation)
    Verify that filter rule with same name doesn't already exist
    Create filter to file meeting messages into folder

    All can be done via zmmailbox

    zmmailbox -z -m <boss_account> gaf will list all folders for boss's account

    Can also do zmmailbox -z -m <boss_account> gf "<folder name>"; will return info on folder, or error if folder doesn't exist.

    zmmailbox -z -m <boss_account> cf -V message "</absolute/path>" will create a folder

    zmmailbox -z -m <boss_account> mfg "</absolute/path>" account <assistant_account> rwidx will share the message or calendar folder to assistant.

    zmmailbox -z -m <assistant_account> cm -V appointment -F# "</path/as_shown_in_assistant_account>" <boss_account> "</absolute/path/to/Calendar>"
    will mount the shared calendar in the assistant's account and check it to be visible (via the -F# argument)

    zmmailbox -z -m <assistant_account> cm -V message "</path/as_shown_in_assistant_account>" <boss_account> "</absolute/path/to/folder>" will mount the shared folder in the assistant's account.

    zmmailbox -z -m <boss_account> gfrl will list filter rules--useful to check beforehand to avoid filter name conflicts. (pipe through grep).

    zmmailbox -z -m <boss_account> afrl "<rule_name>" body contains "Content-Type: text/calendar" body contains "method=" body contains "METHOD:" body contains "BEGIN:VEVENT" body contains "BEGIN:VCALENDAR" fileinto "<folder_name>" stop will create the necessary filter rule.

  9. #9
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default shell script to delegate between accounts

    First real shell scripting I've done...

    Note that this should no longer be necessary once 6.0 (GunsNRoses) is released.

    Code:
    # ! /bin/sh
    #
    # Script to perform Calendar delegation between accounts
    #
    # Usage ./zmdelegate source_account delegate_account
    # Should be executed as zimbra user.
    # 
    #
    # Name of notifications folder
    notifications="Meeting Notifications"
    # Name of filter used on boss's account
    filtername="Meeting Notifications"
    # response variable
    response=
    # Note: could do all checking and then output list of all problems
    # instead of exiting after first detected problem
    #
    # Verify exactly two arguments
    # (Could use shell Shift command to allow multiple delegation)
    if test $# -ne 2
    then
    echo "Must supply exactly two arguments."
    exit 1
    fi
    # Assign variables
    boss_account=$1
    assistant_account=$2
    # Verify <boss_account> and <assistant_account> exist on the server
    if ! zmmailbox -z -m $boss_account gms 1>/dev/null 2>/dev/null
    then
    echo "Boss account doesn't exist. Terminating."
    exit 1
    fi
    if ! zmmailbox -z -m $assistant_account gms 1>/dev/null 2>/dev/null
    then
    echo "Assistant account doesn't exist. Terminating."
    exit 1
    fi
    # Check if Meeting Notifications Folder already exists; if it does, then post warning and ask if want to continue.
    # Otherwise Create Meeting Notifications Folder
    if zmmailbox -z -m $boss_account gf "$notifications" 1>/dev/null 2>/dev/null
    then
    	while [ "$response" != "y"  -a "$response" != "n" ]
    		do
    			echo -e 'Folder "\c'
    			echo -e "$notifications\c"
    			echo -e '" already exists, use it to store/share notification messages? (y/n) \c'
    			read response
    	done
    	if [ "$response" = n ]
    	then
    		echo "Command cancelled."
    		exit 1
    	fi
    else
    	echo -e 'Creating folder "\c'
    	echo -e "$notifications\c"
    	echo -e '".'
    	zmmailbox -z -m $boss_account cf -V message "/$notifications" 1>/dev/null 2>/dev/null
    fi
    # Make sure that mountpoint names on assistant's account don't already exist
    # Am having to use account names in names of sharepoints because I don't see
    # a way to discover display names via CLI. Could add user-defined sharepoint
    # names later.
    if zmmailbox -z -m $assistant_account gf "/$boss_account $notifications" 1>/dev/null 2>/dev/null
    then
    echo -e 'Naming conflict--delete or unmount folder "\c'
    echo -e "$boss_account $notifications\c"
    echo -e '" on assistant account.'
    exit 1
    fi
    if zmmailbox -z -m $assistant_account gf "/$boss_account Calendar" 1>/dev/null 2>/dev/null
    then
    echo -e 'Naming conflict--delete or unmount calendar "\c'
    echo -e "$boss_account Calendar\c"
    echo -e '" on assistant account.'
    exit 1
    fi
    #Verify that filter rule with same name doesn't already exist
    if eval zmmailbox -z -m $boss_account gfrl | grep ^\"Meeting\ Notifications\" 1>/dev/null
    then
    echo -e 'Naming conflict--delete or rename filter "\c'
    echo -e "$filtername\c"
    echo -e '" on boss account.'
    exit 1
    fi
    # Share Meeting Notifications Folder and Calendar to assistant R/W
    echo "Sharing Meeting Notifications Folder."
    zmmailbox -z -m $boss_account mfg "/$notifications" account $assistant_account rwidx
    echo "Sharing Calendar."
    zmmailbox -z -m $boss_account mfg "/Calendar" account $assistant_account rwidx
    #Accept shares by assistant (only for web interface; Outlook must be done at the workstation)
    echo "Mounting Meeting Notifications Folder on assistant account. Right-click in Zimbra Web Client to change name."
    zmmailbox -z -m $assistant_account cm -F# "/$boss_account $notifications" $boss_account "/$notifications" 1>/dev/null
    echo "Mounting Calendar Folder on assistant account. Right-click in Zimbra Web Client to change name."
    zmmailbox -z -m $assistant_account cm -F# "/$boss_account Calendar" $boss_account "/Calendar" 1>/dev/null
    echo '(In Outlook, use File>Open>Other User’s Folder to access.)'
    #Create filter to file meeting messages into folder
    echo "Creating filter in boss account."
    zmmailbox -z -m $boss_account afrl -f "$filtername" body contains "Content-Type: text/calendar" body contains "method=" body contains "METHOD:" body contains "BEGIN:VEVENT" body contains "BEGIN:VCALENDAR" fileinto "/$notifications" stop
    echo "Delegation complete!"
    Last edited by ewilen; 07-03-2009 at 01:04 PM.

  10. #10
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default Improved version

    This version deals gracefully with situations where Calendar or Meeting Notifications folder have already been mounted by assistant.

    Code:
    # ! /bin/sh
    #
    # Script to perform Calendar delegation between accounts
    # Author: Elliot Wilen
    #
    # Usage ./zmdelegate source_account delegate_account
    #
    #
    # Name of notifications folder
    notifications="Meeting Notifications"
    # Name of filter used on boss's account
    filtername="Meeting Notifications"
    # variable to look at response to interactive prompt
    response=
    # Note: could do all checking and then output list of all problems
    # instead of exiting after first detected problem
    #
    # Verify exactly two arguments
    # (Could use shell Shift command to allow multiple delegation)
    if test $# -ne 2
    then
    echo "Must supply exactly two arguments."
    exit 1
    fi
    # Assign variables
    boss_account=$1
    assistant_account=$2
    # Verify <boss_account> and <assistant_account> exist on the server
    if ! zmmailbox -z -m $boss_account gms 1>/dev/null 2>/dev/null
    then
    echo "Boss account doesn't exist. Exiting."
    exit 1
    fi
    if ! zmmailbox -z -m $assistant_account gms 1>/dev/null 2>/dev/null
    then
    echo "Assistant account doesn't exist. Exiting."
    exit 1
    fi
    # Check if Meeting Notifications folder already exists; if it does, then post warning and ask if want to continue.
    # Otherwise Create Meeting Notifications folder
    if zmmailbox -z -m $boss_account gf "$notifications" 1>/dev/null 2>/dev/null
    then
            while [ "$response" != "y"  -a "$response" != "n" ]
                    do
                            echo -e 'Folder "\c'
                            echo -e "$notifications\c"
                            echo -e '" already exists, use it to store/share notification messages? (y/n) \c'
                            read response
            done
            if [ "$response" = n ]
            then
                    echo "Command cancelled."
                    exit 1
            fi
    else
            echo -e 'Creating folder "\c'
            echo -e "$notifications\c"
            echo -e '".'
            zmmailbox -z -m $boss_account cf -V message "/$notifications" 1>/dev/null 2>/dev/null
    fi
    
    # Share Meeting Notifications folder and Calendar to assistant with Manager rights.
    echo "Sharing Meeting Notifications folder."
    zmmailbox -z -m $boss_account mfg "/$notifications" account $assistant_account rwidx
    echo "Sharing Calendar."
    zmmailbox -z -m $boss_account mfg "/Calendar" account $assistant_account rwidx
    
    # I have to use account names in names of mountpoints because I don't see
    # a way to discover display names via CLI. Could prompt for  user-defined sharepoint
    # names.
    
    # Check if Meeting Notifications is already mounted. (Edge case: it could be mounted but in the Trash.)
    if zmmailbox -z -m $assistant_account gaf | grep \($boss_account\:`zmmailbox -z -m $boss_account gaf | awk '/\/Meeting\ Notifications$/ {print $1}'`\) 1>/dev/null
    then
            echo "Meeting Notifications is already mounted in assistant account...proceeding..."
    else
    # Check for name conflict.
            if zmmailbox -z -m $assistant_account gf "/$boss_account $notifications" 1>/dev/null 2>/dev/null
            then
                    echo -e 'Naming conflict--delete or rename folder "\c'
                    echo -e "$boss_account $notifications\c"
                    echo -e '" on assistant account.'
                    exit 1
            else
    # Accept mail folder share by assistant (only for web interface; Outlook must be done at the workstation)
                    echo "Mounting Meeting Notifications folder on assistant account. Right-click in Zimbra Web Client to change name."
                    zmmailbox -z -m $assistant_account cm -F# "/$boss_account $notifications" $boss_account "/$notifications" 1>/dev/null
            fi
    fi
    # Check if Calendar is already mounted.
    if zmmailbox -z -m $assistant_account gaf | grep \($boss_account\:`zmmailbox -z -m $boss_account gaf | awk '/\/Calendar$/ {print $1}'`\) 1>/dev/null
    then
            echo "Calendar is already mounted in boss account...proceeding..."
    else
    # Check for name conflict.
            if zmmailbox -z -m $assistant_account gf "/$boss_account Calendar" 1>/dev/null 2>/dev/null
            then
                    echo -e 'Naming conflict--delete or rename calendar "\c'
                    echo -e "$boss_account Calendar\c"
                    echo -e '" on assistant account.'
                    exit 1
            else
    # Accept Calendar share by assistant (only for web interface; Outlook must be done at the workstation)
                    echo "Mounting Calendar folder on assistant account. Right-click in Zimbra Web Client to change name."
                    zmmailbox -z -m $assistant_account cm -F# "/$boss_account Calendar" $boss_account "/Calendar" 1>/dev/null
            fi
    fi
    echo "(In Outlook, use File>Open>Other User's Mailbox to access.)"
    
    # Verify that filter rule with same name doesn't already exist
    if zmmailbox -z -m $boss_account gfrl | grep ^\"Meeting\ Notifications\" 1>/dev/null
    then
    echo -e 'Naming conflict--delete or rename filter "\c'
    echo -e "$filtername\c"
    echo -e '" on boss account.'
    exit 1
    fi
    # Create filter to file meeting messages into folder
    echo "Creating filter in boss account."
    zmmailbox -z -m $boss_account afrl -f "$filtername" body contains "Content-Type: text/calendar" body contains "method=" body contains "METHOD:" body contains "BEGIN:VEVENT" body contains "BEGIN:VCALENDAR" fileinto "/$notifications" stop
    echo "Delegation complete!"
    Last edited by ewilen; 07-04-2009 at 12:40 AM.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Changing Calendar Organizer script
    By snsparrish in forum Administrators
    Replies: 4
    Last Post: 05-02-2011, 04:41 AM
  2. Invites and .ics files auto-populate in calendar
    By nsmarler in forum Administrators
    Replies: 2
    Last Post: 01-22-2010, 02:15 PM
  3. forwarding calendar invites
    By ryanp in forum Zimbra Connector for Outlook
    Replies: 2
    Last Post: 06-26-2008, 02:19 PM
  4. Outlook/Zimbra Private Appointments Issue
    By Smurthey in forum Zimbra Connector for Outlook
    Replies: 0
    Last Post: 03-09-2007, 07:29 AM
  5. M2 Experiences?
    By jordandeamattson in forum Users
    Replies: 17
    Last Post: 11-22-2005, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •