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

Thread: ZCS NE shared briefcase

  1. #1
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default ZCS NE shared briefcase

    Hey

    I'm not too sure if this is the right forum for this, but this is what I'd like to achieve. Just not too sure on how

    1) Single shared briefcase that contains shared images
    1.1) Single user has write access all others only have read access
    1.2) Is there any way of disabling or hiding the briefcase tab on the read only users?
    2) each user to reference shared image(s) in a signature

    What I have done so far
    1) edited the default COS to allow Briefcase
    2) altered a single user to user in user briefcase images in a signature
    Code:
     zmprov csig u@tld.com 'name' 'HTML'
    In process
    1) Writing a bash script that will pull user data from a file that will then append each signature based on email, fullname etc..

    Can you guys help with pointers on how to do this? Is all of the above possible?

    Please let me know if there is anything you need to know, and I'll provide as much information as I can

    Code:
    zimbra version
    zimbra@mail:~$ zmcontrol -v
    Release 7.1.4_GA_2555.UBUNTU10_64 UBUNTU10_64 NETWORK edition.
    Thanks and kind regards
    Feighen

  2. #2
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default per user briefcase quota

    per user briefcase quota isn't supported as yet

    possibility of allocating disk quota for briefcase

  3. #3
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default wiki account

    So far this is what I have done

    1) Updated only the wiki account to have the Briefcase enabled
    2) uploaded images and made the wiki Briefcase publicly available (readonly)
    3) in my bash script I enable and disable the per email address briefcase using
    Code:
    zmprov ma user@dmn.tld zimbraFeatureBriefcasesEnabled (TRUE|FALSE)
    The images are referenced via
    Code:
    dfsrc="doc:wiki's%20Briefcase/img.jpg"
    My next question is this
    Is there a way for me to add the wiki briefcase to each users briefcase before disabling the briefcase? I know that I can do it via the interface
    Login->Briefcase->find, but is there a way for me to do it via my bash script?

  4. #4
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default zmmailbox

    Yes there is

    Code:
    zmmailbox -z -m user@dmn.tld cm --view document -F#  "/wiki's Briefcase" wiki@manline.co.za "/Briefcase"
    Had I done a bit more searching I would have found it.

    Zmmailbox - Zimbra :: Wiki

  5. #5
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default full bash script

    I have added the full script here
    Code:
    #!/bin/bash
    accts="/opt/zimbra/bin/zmaccts"
    ZM="/opt/zimbra/bin/zmprov"
    SIGNAME="Corporate Signature"
    echo "Processing $1"
    if [ -f $1 ]; then
        NUMROWS=`cat $1 | wc -l`
        for i in `seq 1 $NUMROWS`; do
            echo "processing row: $i"
            ROW=`cat $1 | head -n $i | tail -n 1`
            email=`echo $ROW | gawk -F ',' '{print $1}' | sed 's/\"//g'`
            fullname=`echo $ROW | gawk -F ',' '{print $2}' | sed 's/\"//g'`
            position=`echo $ROW | gawk -F ',' '{print $3}' | sed 's/\"//g'`
            cell=`echo $ROW | gawk -F ',' '{print $4}' | sed 's/\"//g'`
            STDHTML="<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#016529\"><img dfsrc=\"doc:wiki's%20Briefcase/image001.jpg\" style=\"border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; \" align=\"right\"/></td></tr></table><table width=\"100%\" border=\"0\"></table><p>&nbsp;</p><table width=\"100%\" border=\"0\"><tr><td style=\"color:#6e7961;font-family:Verdana;font-size:10pt;\"><strong>Regards<br/>$fullname </strong>|&nbsp;$position&nbsp;| Manline - Diversified Logistics<br/>tel +27 33 846 0000 | fax +27 33 846 0055<br/>$email | www.manlinegroup.com</td><td><img dfsrc=\"doc:wiki's%20Briefcase/image002.jpg\" style=\"border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; \" align=\"right\"/></td></tr></table><br><hr size=\"1\" color=\"#ced4c6\" noshade /><table width=\"100%\" height=\"10px\" border=\"0\"></table><table width=\"100%\" border=\"0\"><tr><td><DIV align=\"center\" style=\"color:#bbc0b4;font-family:Verdana;font-size:8pt;\">This electronic communication and the attached file(s) are subject to a disclaimer which can be found  <a href=\"http://www.manlinegroup.com/disclaimer.pdf\">here</a></DIV></td></tr></table>"
            CELLHTML="<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#016529\"><img dfsrc=\"doc:wiki's%20Briefcase/image001.jpg\" style=\"border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; \" align=\"right\"/></td></tr></table><table width=\"100%\" border=\"0\"></table><p>&nbsp;</p><table width=\"100%\" border=\"0\"><tr><td style=\"color:#6e7961;font-family:Verdana;font-size:10pt;\"><strong>Regards<br/>$fullname </strong>|&nbsp;$position&nbsp;| Manline - Diversified Logistics<br/>tel +27 33 846 0000 | fax +27 33 846 0055 | cell $cell<br/>$email | www.manlinegroup.com</td><td><img dfsrc=\"doc:wiki's%20Briefcase/image002.jpg\" style=\"border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; \" align=\"right\"/></td></tr></table><br><hr size=\"1\" color=\"#ced4c6\" noshade /><table width=\"100%\" height=\"10px\" border=\"0\"></table><table width=\"100%\" border=\"0\"><tr><td><DIV align=\"center\" style=\"color:#bbc0b4;font-family:Verdana;font-size:8pt;\">This electronic communication and the attached file(s) are subject to a disclaimer which can be found  <a href=\"http://www.manlinegroup.com/disclaimer.pdf\">here</a></DIV></td></tr></table>"
    	if [[ `$accts | grep $email | cut -d" " -f1` = $email ]]; then
    		if [[ `expr match "$email" '.*@.*'` > 0 ]]; then
    			echo "Enabling Briefcase for user: $email"
    			`$ZM ma $email zimbraFeatureBriefcasesEnabled TRUE`
    			echo "Adding wiki user Briefcase"
    			`/opt/zimbra/bin/zmmailbox -z -m $email cm --view document -F# "/wiki's Briefcase" wiki@manline.co.za "/Briefcase"`
                if [[ `zmprov getSignatures $email | grep "$SIGNAME" | wc -l` = 0 ]]; then
    				if [[ $cell = "" ]]; then
        	            # create the correct signature
    					echo "$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$STDHTML""
    					`$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$STDHTML"`
                	else
    					echo "$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$CELLHTML""
                    	`$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$CELLHTML"`
    	            fi
    			fi
    			echo "Disabling Briefcase for user: $email"
                `$ZM ma $email zimbraFeatureBriefcasesEnabled FALSE`
            fi
    	fi
        done
    fi
    Usage example
    Code:
    zimbra@feighen:~$ /bash_scripts/zmCreateCorporateSignature.sh /bash_scripts/signatures.csv
    contents of /bash_scripts/signatures.csv
    Code:
    email, fullname, position, cell
    "user@dmn.tld", "User Name", "Position", "+27000000000"
    "user2@dmn.tld", "User Name", "Position"
    Can anybody tell me if there if a better, or simpler method of doing this?

  6. #6
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default

    Hi guys

    I have not solved this. The embedded image is visible when editing the signature, but once it is sent I get no image in the received signature

    I sent it to my one of my email accounts and viewed the original

    Code:
    Delivered-To: feighen@tld.com
    Received: by 10.216.54.147 with SMTP id i19csp151509wec;
            Wed, 25 Apr 2012 00:57:48 -0700 (PDT)
    Received: by 10.216.218.193 with SMTP id k43mr974153wep.104.1335340668364;
            Wed, 25 Apr 2012 00:57:48 -0700 (PDT)
    Return-Path: <feighen@tld.com>
    Received: from mail.tld.co.za (mail.tld.co.za. [xxx.xxx.xxx.xxx])
            by mx.tld.com with ESMTP id n13si13348009wee.42.2012.04.25.00.57.47;
            Wed, 25 Apr 2012 00:57:48 -0700 (PDT)
    Received-SPF: neutral (tld.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of feighen@tld.com) client-ip=41.216.132.82;
    Authentication-Results: mx.tld.com; spf=neutral (tld.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of feighen@tld.com) smtp.mail=feighen@tld.com
    Received: from localhost (localhost.localdomain [127.0.0.1])
    	by mail.tld.co.za (Postfix) with ESMTP id 170FB6B606BD;
    	Wed, 25 Apr 2012 09:57:37 +0200 (SAST)
    X-Virus-Scanned: amavisd-new at mail.tld.co.za
    Received: from mail.tld.co.za ([127.0.0.1])
    	by localhost (mail.tld.co.za [127.0.0.1]) (amavisd-new, port 10024)
    	with ESMTP id sTIO0aW8Ysaj; Wed, 25 Apr 2012 09:57:36 +0200 (SAST)
    Received: from mail.tld.co.za (mail.tld.co.za [xxx.xxx.xxx.xxx])
    	by mail.tld.co.za (Postfix) with ESMTP id E20C16B606BF;
    	Wed, 25 Apr 2012 09:57:36 +0200 (SAST)
    Date: Wed, 25 Apr 2012 09:57:36 +0200 (SAST)
    From: Feighen Oosterbroek <feighen@tld.com>
    To: Feighen Oosterbroek <feighen@tld.com>
    Message-ID: <1626858139.2480934.1335340656897.JavaMail.root@mail.tld.co.za>
    Subject: test
    MIME-Version: 1.0
    Content-Type: multipart/alternative; 
    	boundary="----=_Part_2480932_1742477694.1335340656896"
    X-Originating-IP: [xxx.xxx.xxx.xxx]
    X-Mailer: Zimbra 7.1.4_GA_2555 (ZimbraWebClient - GC17 (Linux)/7.1.4_GA_2555)
    
    ------=_Part_2480932_1742477694.1335340656896
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 7bit
    
    
    
    
    
    
    ------=_Part_2480932_1742477694.1335340656896
    Content-Type: multipart/related; 
    	boundary="----=_Part_2480933_588108919.1335340656896"
    
    ------=_Part_2480933_588108919.1335340656896
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: 7bit
    
    <html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: verdana,helvetica,sans-serif; font-size: 10pt; color: #000000'><br><br><div><span name="x"></span><img src="cid:11a98e4fe21401b0d70e92db361af2350449fde4@zimbra"s%20Briefcase/logo_manline.jpg" doc="wiki's%20Briefcase/logo_manline.jpg"><span name="x"></span><br></div></div></body></html>
    ------=_Part_2480933_588108919.1335340656896--
    
    ------=_Part_2480932_1742477694.1335340656896--
    To me it looks as if the cid breaks as it includes a "

    I'm not too sure on how to fix that. Any ideas?

  7. #7
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default

    If I URL encode the image source it get better

    Code used to generate signature
    Code:
    #!/bin/bash
    accts="/opt/zimbra/bin/zmaccts"
    ZM="/opt/zimbra/bin/zmprov"
    SIGNAME="Corporate Signature"
    echo "Processing $1"
    if [ -f $1 ]; then
        NUMROWS=`cat $1 | wc -l`
        for i in `seq 1 $NUMROWS`; do
            echo "processing row: $i"
            ROW=`cat $1 | head -n $i | tail -n 1`
            email=`echo $ROW | gawk -F ',' '{print $1}' | sed 's/\"//g'`
            fullname=`echo $ROW | gawk -F ',' '{print $2}' | sed 's/\"//g'`
            position=`echo $ROW | gawk -F ',' '{print $3}' | sed 's/\"//g'`
            cell=`echo $ROW | gawk -F ',' '{print $4}' | sed 's/\"//g'`
            logo=`echo $ROW | gawk -F ',' '{print $5}' | sed 's/\"//g'`
            src="doc:wiki%27s%20Briefcase"
            STDHTML="<img dfsrc=\"$src/$logo.jpg\" />"
            if [[ `$accts | grep $email | cut -d" " -f1` = $email ]]; then
                if [[ `expr match "$email" '.*@.*'` > 0 ]]; then
                    echo "Enabling Briefcase for user: $email"
                    `$ZM ma $email zimbraFeatureBriefcasesEnabled TRUE`
                    echo "Adding wiki user Briefcase"
                    `/opt/zimbra/bin/zmmailbox -z -m $email cm --view document -F# "/wiki's Briefcase" wiki@manline.co.za "/Briefcase"`
                    if [[ `$ZM getSignatures $email | grep "$SIGNAME" | wc -l` = 0 ]]; then
                        if [[ $cell = "" ]]; then
                            # create the correct signature
                            echo "$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$STDHTML""
                            `$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$STDHTML"`
                        else
                            echo "$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$CELLHTML""
                            `$ZM csig $email "$SIGNAME" zimbraPrefMailSignatureHTML "$CELLHTML"`
                        fi
                    fi
                    ID=`$ZM getSignatures $email | grep -B 1 "$SIGNAME" | grep "Id" | cut -f 2 -d" "`
                    echo "Updating default signature for user: $email"
                    `$ZM ma $email zimbraPrefDefaultSignatureId $ID`
                    echo "Disabling Briefcase for user: $email"
                    `$ZM ma $email zimbraFeatureBriefcasesEnabled FALSE`
                fi
            fi
        done
    fi
    Email output
    Code:
    <img src="cid:5fe58abd6fecef44e0efab70227dadf17f6600ba@zimbra" doc="wiki%27s%20Briefcase/logo_manline.jpg">

  8. #8
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default

    so what I have found is that a shared briefcase doesn't work
    individual briefcase does however

    so now what I've got to do is find a method of adding an image to the per user briefcase via the CLI. Any ideas?

  9. #9
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    476
    Rep Power
    4

  10. #10
    noondaysun is offline Intermediate Member
    Join Date
    Mar 2012
    Location
    Pietermaritzburg
    Posts
    23
    Rep Power
    3

    Default

    hey ccelis

    Many thanks. That should solve things for me quite nicely

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. Replies: 2
    Last Post: 04-07-2011, 02:09 AM
  2. Trouble Sending mail - All Messages deferred!
    By SiteDiscovery in forum Administrators
    Replies: 7
    Last Post: 09-03-2009, 04:52 AM
  3. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  4. Unable to removed shared briefcase
    By kpatton in forum Users
    Replies: 0
    Last Post: 02-01-2008, 10:58 AM
  5. ZCS 3.2 Beta Available
    By KevinH in forum Announcements
    Replies: 31
    Last Post: 07-07-2006, 03:46 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
  •