Difference between revisions of "HowTos/Public Folders"
(→Managing eMail Addresses for Public Folder) |
(→Public Folder Replication in Multi-Server Configurations) |
||
Line 94: | Line 94: | ||
== Public Folder Replication in Multi-Server Configurations == | == Public Folder Replication in Multi-Server Configurations == | ||
− | + | To replicate Public Folders in a Multi-Server Configuration you must a Sync Agreement between the main and remote servers. | |
+ | |||
+ | On the main server where the folder lives: | ||
+ | |||
+ | omaddbbsa -m "OMSYNC +BB/<remote mailnode>" -s "<Public Folder Name>" | ||
+ | |||
+ | |||
+ | On the remote server where the folder is to be replicated: | ||
+ | |||
+ | omaddbbsa -m "OMSYNC +BB/<main mailnode>" -s "<Public Folder Name>" | ||
+ | |||
+ | |||
+ | Breaking that down... | ||
+ | |||
+ | Add a Sync Agreement. The command will sent to and recieve from "omsync +bb/mailnode". And the agreement will cover a bulletin board with a subject of "Public Folder Name". Note that you can use wildcards for the filename. Also note that where the BB itself is case sensitive; so Test is different from TEST which is different from test; the sync agreement is not, so an agreement would pull data from all 3, and push it to a single folder on the remote side. | ||
+ | |||
+ | You need to have agreements on both servers before data will pass, because each server needs to be authorized to import data from the far side, as well as sending data to the far side. | ||
+ | |||
+ | Once the agreement has been added, use "omoff -d0 -w bb && omon bb" to restart the BB service and have it pick up the new change. | ||
+ | |||
+ | There are also some tweaks in general.cfg. 2 are supposed to work together to make a delete on any server push back to all of the other servers. The last one changes the sync interval from the 60 minute default down to 1 minute. | ||
+ | |||
+ | BBS_PROPAGATE_SLAVE_DELETION=TRUE | ||
+ | |||
+ | BBS_DELETE_MASTER_BY_SYNC=TRUE | ||
+ | |||
+ | BBS_CUST_CHECK_TIME=1 | ||
+ | |||
+ | |||
+ | (thanks go out to Kevin Anderson) | ||
== Simple wrapper script for more convenience == | == Simple wrapper script for more convenience == |
Revision as of 12:08, 16 October 2008
Scalix Wiki -> How-Tos -> Public Folders
Contents
- 1 Creating Public Folder with the SAC plugin
- 2 Managing eMail Addresses for Public Folder
- 3 Managing Permissions for Public Folders
- 4 Allow Attachements to be sent to Public Folder from outside world
- 5 Maintaining Public Folders
- 6 Public Folder Replication in Multi-Server Configurations
- 7 Simple wrapper script for more convenience
Creating Public Folder with the SAC plugin
There exists the addpf plugin to create public folders from the admin interface.
Managing eMail Addresses for Public Folder
To assign an eMail address to a public folder, use the following steps: First, you need to find out the name of your primary mailnode. At the shell prompt, type the following command to find out your system's default mailnode:
omshowmn
If multiple mailnodes are listed, the one marked with the double star ("**") is the primary, as in
** scalix,demo scalix,training
The mailnode is displayed in "positional format", i.e. it's components are separated by comma (","). There can be up to four components. These are named OU1-OU4, from left to right. Using this naming, the mailnode can also be rewritten in "tagged attribute" format. For example, if your mailnode is scalix,demo, it can also be written as OU1=scalix/OU2=demo; if it's only mynode, it is rewritten OU1=mynode and if it is scalix,hq,sales, it can be rewritten OU1=scalix/OU2=hq/OU3=sales. You will need to specify the mailnode in tagged attribute format in the next command. To add the address to the folder, use the following command syntax:
omaddent -e "S=+BB/<Mailnode>/DDT1=BB/DDV1=<Folder>/IA=<SMTP Address>/CN=<Display>"
In this command line,
- <Mailnode> represents your primary mailnode,
- <Folder> represents the Name of your public folder,
- <SMTP Address> is the Internet address you want to use and
- <Display> is the name of the address entry as it will appear in your address book.
For example, use
omaddent -e "S=+BB/OU1=scalix/OU2=demo/DDT1=BB/DDV1=Orders/IA=orders@scalix.com/CN=Orders Basket"
to add the Internet address orders@scalix.com to a Top-level public folder called Orders. You will also see an entry in your Outlook and SWA address books, so that internal users can also send email to the folder. To specify a subfolder, use the ">" syntax, i.e. use "Orders>Incoming" to specify a subfolder called incoming under the top-level "Orders" folder. This can be nested.
If the foldername contains accentuated characters you have to use DDV1-TX in addition to the IA5 translated DDV1 attribute:
omaddent -e "S=+BB/OU1=scalix/DDT1=BB/DDV1=Oelmtoelp/DDV1-TX=Ölmtölp/ia=oelmtoelp@scalix.com/CN=Oelmtoelp/CN-TX=Ölmtölp"To avoid displaying the entry in the addressbook, add
/EX-CDA-DIRECTORY=1to the end of the attribute list when adding the entry. To specify multiple Internet addresses for a single folder, use the
IA=<SMTP Address 1>=<SMTP Address 2>=...syntax when specifying the Internet address.
To change the address for a folder that already has an address assigned, use the following command syntax:
ommodent -e "S=+BB/<mailnode>/DDT1=BB/DDV1=<Folder>" -n "IA=<New SMTP Address>"
This, with different parameter values for the -n option, can also be used to change the display name or the "exclude from addressbook" attribute. To remove the "exclude from addressbook" attribute, set it to an empty value, i.e.
-n EX-CDA-DIRECTORY=
Finally, to remove an email address from a public folder completely and let it disappear from the internal address book, delete the directory entry using the following command syntax:
omdelent -e "S=+BB/<mailnode>/DDT1=BB/DDV1=<Folder>"
Managing Permissions for Public Folders
Permissions for Public Folders are managed with Access Control Lists (ACL). In addition to mailclients which are able to set permissions we can set, display and modify ACLs from the command-line.
As there are several other types of resources which will work with ACLs too we have to specify the resource which we want to manipulate. The resource name for Public Folders is "bulletin", abbreviated "bb".
The invoker of the ACL-commands has to have at least configuration capability for the specified resource.
To display the defined permissions for a folder "My Folder" we can use
omshowacl -t bb -l ":My Folder"
Please note the colon at the beginning of the foldername.
To view the permissions of a nested folder "My Subfolder" below "My Folder" we use
omshowacl -t bb -l ":My Folder>My Subfolder"
omshowacl will also work with direct reference numbers, but this is more useful for people who use IP-adresses instead of hostnames. Reference numbers can be used be in scripts too.
Lets have a look at the output of omshowacl. A folder with standard permissions will look like this:
Scalix Administrators config read see delete attach Local Users none Default read see attach
We can see the predefined groups with their actual permissions.
see: can only see the subject of the Public Folder read: can open the Public Folder and access the content attach: can put some things into the Public Folder and delete own stuff delete: can throw away things other people have attached config: can rename, delete Folders, set ACLs, can not add items
Modification is possible with the ommodacln command (mind the "n").
ommodacln -t bb -l ":My Folder" -g Default -c delete.
Allow Attachements to be sent to Public Folder from outside world
use
omlistbbs -b
to get the BB-number and
ommodacln -t bulletin -b <TheNumberFromAbove> -g default -c +attach
to change the Permission of the Folder.
to be continued..
Maintaining Public Folders
Here is a list of command line tools for maintaining and modifying Scalix public folders (aka Bulletin Boards). See the man page for each command for further details.
- omaddbb - add a Bulletin Board
- omdelbb - delete a Bulletin Board
- omlistbbs - list Bulletin Boards
- omshowbb - show details of a Bulletin Board
- ommodbb - modify a Bulletin Board
Public Folder Replication in Multi-Server Configurations
To replicate Public Folders in a Multi-Server Configuration you must a Sync Agreement between the main and remote servers.
On the main server where the folder lives:
omaddbbsa -m "OMSYNC +BB/<remote mailnode>" -s "<Public Folder Name>"
On the remote server where the folder is to be replicated:
omaddbbsa -m "OMSYNC +BB/<main mailnode>" -s "<Public Folder Name>"
Breaking that down...
Add a Sync Agreement. The command will sent to and recieve from "omsync +bb/mailnode". And the agreement will cover a bulletin board with a subject of "Public Folder Name". Note that you can use wildcards for the filename. Also note that where the BB itself is case sensitive; so Test is different from TEST which is different from test; the sync agreement is not, so an agreement would pull data from all 3, and push it to a single folder on the remote side.
You need to have agreements on both servers before data will pass, because each server needs to be authorized to import data from the far side, as well as sending data to the far side.
Once the agreement has been added, use "omoff -d0 -w bb && omon bb" to restart the BB service and have it pick up the new change.
There are also some tweaks in general.cfg. 2 are supposed to work together to make a delete on any server push back to all of the other servers. The last one changes the sync interval from the 60 minute default down to 1 minute.
BBS_PROPAGATE_SLAVE_DELETION=TRUE
BBS_DELETE_MASTER_BY_SYNC=TRUE
BBS_CUST_CHECK_TIME=1
(thanks go out to Kevin Anderson)
Simple wrapper script for more convenience
As I start using scalix I see many somehow cryptic commands which often caused trouble for some users, me included. As I did not find anything compareable I started this one. It is based upon the advanced bash scriptung guide template for getopt_simple. I am in no way a bash professional so please bare with me, don't complain, edit it so it is more useful, less erroneous, more userfriendly, less sluggish written, more convinient and of course more powerful. I really urge the wiki-community to modify this script!
--TCWardrobe 12:30, 29 August 2006 (PDT)
#!/bin/bash # create-email-folder.sh a convinient way to add # an emailable folder for scalix # # Author: Michael Schmitt # Contributors: # # copy, use, edit, enhance it or throw it away. Do # whatever you want as long as nobody is hurt... # and of course it is covered by the GPL ;) # template used was getopt_simple from # http://www.tldp.org/LDP/abs/html/ echo Usage: create-email-folder.sh -n=foldername -m1=mailnode1 -m2=mailnode2 -e=e-mailaddress echo Note: -m1 and -m2 represent your mailnode as m1,m2 syntax echo as I am to dumb to parse the output of omshowmn in a smart way create_folder() { echo "create_folder()" echo "Parameters are '$*'" until [ -z "$1" ] do echo "Processing parameter of: '$1'" if [ ${1:0:1} = '-' ] then tmp=${1:1} # Strip off leading '-' . . . parameter=${tmp%%=*} # Extract name. value=${tmp##*=} # Extract value. echo "Parameter: '$parameter', value: '$value'" eval $parameter=$value fi shift done } # Pass all options to create_folder(). create_folder $* echo "Foldername is '$n'" echo "Mailnode1 is '$m1'" echo "Mailnode2 is '$m2'" echo "Mailaddress is '$e'" omaddent -e "S=+BB/CN=$n/OU1=$m1/OU2=$m2/DDT1=BB/DDV1=$n/IA=$e" exit 0