summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ea0527f)
raw | patch | inline | side by side (parent: ea0527f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 08:16:21 +0000 (08:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 08:16:21 +0000 (08:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19495 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_groupware.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/groupware/personal/groupware/generic.tpl | [new file with mode: 0644] | patch | blob |
gosa-plugins/groupware/plugin.dsc | [new file with mode: 0644] | patch | blob |
diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc
--- /dev/null
@@ -0,0 +1,593 @@
+<?php
+
+class groupware extends plugin
+{
+ var $plHeadline = "Mail";
+ var $plDescription = "GOsa mail extension.";
+
+ var $attributes = array(
+ "mailAddress",
+ "mailLocation",
+ "quotaUsage",
+ "quotaSize",
+ "alternateAddresses",
+ "forwardingAddresses",
+ "vacationEnabled",
+ "vacationStart",
+ "vacationStop",
+ "vacationMessage",
+ "mailBoxWarnLimitEnabled",
+ "mailBoxWarnLimitValue",
+ "mailBoxSendSizelimitEnabled",
+ "mailBoxSendSizelimitValue",
+ "mailBoxHardSizelimitEnabled",
+ "mailBoxHardSizelimitValue",
+ "mailBoxAutomaticRemovalEnabled",
+ "mailBoxAutomaticRemovalValue",
+ );
+
+ var $mailAddressSelectDialog = NULL;
+ var $vacationTemplates = array();
+
+ var $mailAddress = "";
+ var $mailLocation = "";
+ var $quotaUsage = "";
+ var $quotaSize = "";
+ var $alternateAddresses = "";
+ var $forwardingAddresses = "";
+ var $vacationEnabled = FALSE;
+ var $vacationStart = "";
+ var $vacationStop = "";
+ var $vacationMessage = "";
+ var $mailBoxWarnLimitEnabled = FALSE;
+ var $mailBoxWarnLimitValue = "";
+ var $mailBoxSendSizelimitEnabled = FALSE;
+ var $mailBoxSendSizelimitValue = "";
+ var $mailBoxHardSizelimitEnabled = FALSE;
+ var $mailBoxHardSizelimitValue = "";
+ var $mailBoxAutomaticRemovalEnabled = FALSE;
+ var $mailBoxAutomaticRemovalValue = "";
+
+ function __construct ($config, $dn= NULL)
+ {
+ plugin::plugin($config,$dn);
+
+ // Get attributes from parent object
+ foreach(array("uid","cn") as $attr){
+ if(isset($this->parent->by_object['group']) && isset($this->parent->by_object['group']->$attr)){
+ $this->$attr = &$this->parent->by_object['group']->$attr;
+ }elseif(isset($this->attrs[$attr])){
+ $this->$attr = $this->attrs[$attr][0];
+ }
+ }
+
+ // Prepare vacation start/stop time to be initially valid.
+ $this->gosaVacationStart= date('d.m.Y', $this->gosaVacationStart);
+ $this->gosaVacationStop= date('d.m.Y', $this->gosaVacationStop);
+ }
+
+
+ function execute()
+ {
+
+ // Register plugin execution
+ $display = plugin::execute();
+
+ // Log plugin execution.
+ if($this->is_account && !$this->view_logged){
+ $this->view_logged = TRUE;
+ new log("view","users/".get_class($this),$this->dn);
+ }
+
+
+ /****************
+ Account status
+ ****************/
+
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable() && $this->mailMethod->accountRemoveAble()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable() && $this->mailMethod->accountCreateable()){
+ $this->is_account= TRUE;
+ }
+ }
+ if(!$this->multiple_support_active){
+ if (!$this->is_account && $this->parent === NULL){
+ $display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\"> <b>".
+ msgPool::noValidExtension(_("Mail"))."</b>";
+ $display.= back_to_main();
+ return ($display);
+ }
+ if ($this->parent !== NULL){
+ if ($this->is_account){
+ $display= $this->show_disable_header(msgPool::removeFeaturesButton(_("Mail")),msgPool::featuresEnabled(_("Mail")));
+ } else {
+ $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Mail")),msgPool::featuresDisabled(_("Mail")));
+ return ($display);
+ }
+ }
+ }
+
+ /****************
+ Forward addresses
+ ****************/
+
+ // Display dialog to select a local fowarder
+ if (isset($_POST['addLocalForwardingAddress'])){
+ $this->mailAddressSelectDialog= new mailAddressSelect($this->config, get_userinfo());
+ $this->dialog= TRUE;
+ }
+
+ // Close dialogs, action was canceled
+ if (isset($_POST['mailAddressSelect_cancel'])){
+ $this->mailAddressSelectDialog= FALSE;
+ $this->dialog= FALSE;
+ }
+
+ // Append selected forwarding addresses now.
+ if (isset($_POST['mailAddressSelect_save']) && $this->mailAddressSelectDialog instanceOf mailAddressSelect){
+ if($this->acl_is_writeable("gosaMailForwardingAddress")){
+ $list = $this->mailAddressSelectDialog->save();
+ foreach ($list as $entry){
+ $val = $entry['mail'][0];
+ if (!in_array ($val, $this->gosaMailAlternateAddress) && $val != $this->mail){
+ $this->addForwarder($val);
+ $this->is_modified= TRUE;
+ }
+ }
+ $this->mailAddressSelectDialog= FALSE;
+ $this->dialog= FALSE;
+ } else {
+ msg_dialog::display(_("Error"), _("Please select an entry!"), ERROR_DIALOG);
+ }
+ }
+
+ // Display the address selection dialog.
+ if($this->mailAddressSelectDialog instanceOf mailAddressSelect){
+ $used = array();
+ $used['mail'] = array_values($this->gosaMailAlternateAddress);
+ $used['mail'] = array_merge($used['mail'], array_values($this->gosaMailForwardingAddress));
+ $used['mail'][] = $this->mail;
+
+ // Build up blocklist
+ session::set('filterBlacklist', $used);
+ return($this->mailAddressSelectDialog->execute());
+ }
+
+ // Add manually inserted forwarding address.
+ if (isset($_POST['addForwardingAddress'])){
+ if ($_POST['forwardingAddressInput'] != ""){
+ $address= get_post('forwardingAddressInput');
+ $valid= FALSE;
+ if (!tests::is_email($address)){
+ if (!tests::is_email($address, TRUE)){
+ if ($this->is_template){
+ $valid= TRUE;
+ } else {
+ msg_dialog::display(_("Error"), msgPool::invalid(_("Mail address"),
+ "","","your-address@your-domain.com"),ERROR_DIALOG);
+ }
+ }
+ } elseif ($address == $this->mail
+ || in_array($address, $this->gosaMailAlternateAddress)) {
+ msg_dialog::display(_("Error"),_("Cannot add primary address to the list of forwarders!") , ERROR_DIALOG);
+ } else {
+ $valid= TRUE;
+ }
+ if ($valid){
+ if($this->acl_is_writeable("gosaMailForwardingAddress")){
+ $this->addForwarder ($address);
+ $this->is_modified= TRUE;
+ }
+ }
+ }
+ }
+ if (isset($_POST['deleteForwardingAddress'])){
+ $this->delForwarder ($_POST['forwardingAddressList']);
+ }
+
+
+ /****************
+ Alternate addresses
+ ****************/
+
+ // Add manually inserted alternate mail address.
+ if (isset($_POST['addAlternateAddress'])){
+ $valid= FALSE;
+ if (!tests::is_email($_POST['alternateAddressInput'])){
+ if ($this->is_template){
+ if (!(tests::is_email($_POST['alternateAddressInput'], TRUE))){
+ msg_dialog::display(_("Error"),msgPool::invalid(_("Mail address"),
+ "","","your-domain@your-domain.com"),ERROR_DIALOG);
+ } else {
+ $valid= TRUE;
+ }
+ } else {
+ msg_dialog::display(_("Error"),msgPool::invalid(_("Mail address"),
+ "","","your-domain@your-domain.com"),ERROR_DIALOG);
+ }
+ } else {
+ $valid= TRUE;
+ }
+ if ($valid && ($user= $this->addAlternate (get_post('alternateAddressInput'))) != ""){
+ $ui= get_userinfo();
+ $addon= "";
+ if ($user[0] == "!") {
+ $addon= sprintf(_("Address is already in use by group '%s'."), mb_substr($user, 1));
+ } else {
+ $addon= sprintf(_("Address is already in use by user '%s'."), $user);
+ }
+ msg_dialog::display(_("Error"), msgPool::duplicated(_("Mail address"))."<br><br><i>".
+ "$addon</i>", ERROR_DIALOG);
+ }
+ }
+
+ // Remove alternate mail address.
+ if (isset($_POST['deleteAlternateAddress']) && isset($_POST['alternateAddressList'])){
+ $this->delAlternate ($_POST['alternateAddressList']);
+ }
+
+
+ /****************
+ SMARTY- Assign smarty variables
+ ****************/
+
+ $smarty = get_smarty();
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr, $this->$attr);
+ }
+
+ /****************
+ SMARTY- Assign flags
+ ****************/
+
+ /****************
+ Smarty- Vacation settings
+ ****************/
+
+ $smarty->assign("mailLocations", array("tester"));
+ if (count($this->vacationTemplates)){
+ $smarty->assign("displayTemplateSelector", "true");
+ $smarty->assign("vacationTemplate", set_post($this->vacationTemplate));
+ $smarty->assign("vacationTemplates", set_post($this->vacationTemplates));
+ $smarty->assign("template", set_post(get_post('vacation_template')));
+ } else {
+ $smarty->assign("displayTemplateSelector", "false");
+ }
+
+ return($display.$smarty->fetch(get_template_path("generic.tpl",TRUE,dirname(__FILE__))));
+ }
+
+
+
+ /* Save data to object */
+ function save_object()
+ {
+ }
+
+
+ /*! \brief Parse vacation templates and build up an array
+ containing 'filename' => 'description'.
+ Used to fill vacation dropdown box.
+ @return Array All useable vacation templates.
+ */
+ function get_vacation_templates()
+ {
+ $vct = array();
+ if ($this->config->get_cfg_value("core","vacationTemplateDirectory") != ""){
+ $dir= $this->config->get_cfg_value("core","vacationTemplateDirectory");
+ if (is_dir($dir) && is_readable($dir)){
+ $dh = opendir($dir);
+ while($file = readdir($dh)){
+ $description= "";
+ if (is_file($dir."/".$file)){
+ $fh = fopen($dir."/".$file, "r");
+ $line= fgets($fh, 256);
+ if (!preg_match('/^DESC:/', $line)){
+ msg_dialog::display(_("Configuration error"), sprintf(_("No DESC tag in vacation template '%s'!"), $file), ERROR_DIALOG);
+ }else{
+ $description= trim(preg_replace('/^DESC:\s*/', '', $line));
+ }
+ fclose ($fh);
+ }
+ if ($description != ""){
+ $vct["$dir/$file"]= $description;
+ }
+ }
+ closedir($dh);
+ }
+ }
+ return($vct);
+ }
+
+
+ /*! \brief Adds the given mail address to the list of mail forwarders
+ */
+ function addForwarder($address)
+ {
+ if(empty($address)) return;
+ if($this->acl_is_writeable("gosaMailForwardingAddress")){
+ $this->gosaMailForwardingAddress[]= $address;
+ $this->gosaMailForwardingAddress= array_unique ($this->gosaMailForwardingAddress);
+ sort ($this->gosaMailForwardingAddress);
+ reset ($this->gosaMailForwardingAddress);
+ $this->is_modified= TRUE;
+ }else{
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses!"), ERROR_DIALOG);
+ }
+ }
+
+
+ /*! \brief Removes the given mail address from the list of mail forwarders
+ */
+ function delForwarder($addresses)
+ {
+ if($this->acl_is_writeable("gosaMailForwardingAddress")){
+ $this->gosaMailForwardingAddress= array_remove_entries ($addresses, $this->gosaMailForwardingAddress);
+ $this->is_modified= TRUE;
+ }else{
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses!"), ERROR_DIALOG);
+ }
+ }
+
+
+ /*! \brief Add given mail address to the list of alternate adresses ,
+ . check if this mal address is used, skip adding in this case
+ */
+ function addAlternate($address)
+ {
+ if(empty($address)) return;
+ if($this->acl_is_writeable("gosaMailAlternateAddress")){
+ $ldap= $this->config->get_ldap_link();
+ $address= strtolower($address);
+
+ /* Is this address already assigned in LDAP? */
+ $ldap->cd ($this->config->current['BASE']);
+ $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=$address)".
+ "(alias=$address)(gosaMailAlternateAddress=$address)))", array("uid", "cn"));
+ if ($ldap->count() > 0){
+ $attrs= $ldap->fetch ();
+ if (!isset($attrs["uid"])) {
+ return ("!".$attrs["cn"][0]);
+ }
+ return ($attrs["uid"][0]);
+ }
+ if (!in_array($address, $this->gosaMailAlternateAddress)){
+ $this->gosaMailAlternateAddress[]= $address;
+ $this->is_modified= TRUE;
+ }
+ sort ($this->gosaMailAlternateAddress);
+ reset ($this->gosaMailAlternateAddress);
+ return ("");
+ }else{
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses!"), ERROR_DIALOG);
+ }
+ }
+
+
+ /*! \brief Removes the given mail address from the alternate addresses list
+ */
+ function delAlternate($addresses)
+ {
+ if($this->acl_is_writeable("gosaMailAlternateAddress")){
+ $this->gosaMailAlternateAddress= array_remove_entries ($addresses,$this->gosaMailAlternateAddress);
+ $this->is_modified= TRUE;
+ }else{
+ msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses!"), ERROR_DIALOG);
+ }
+ }
+
+
+ /*! \brief Prepare importet vacation string. \
+ . Replace placeholder like %givenName a.s.o.
+ @param string Vacation string
+ @return string Completed vacation string
+ */
+ private function prepare_vacation_template($contents)
+ {
+ /* Replace attributes */
+ $attrs = array();
+ $obj = NULL;
+ if(isset($this->parent->by_object['user'])){
+ $attrs = $this->parent->by_object['user']->attributes;
+ $obj = $this->parent->by_object['user'];
+ }else{
+ $obj = new user($this->config,$this->dn);
+ $attrs = $obj->attributes;
+ }
+ if($obj){
+
+ /* Replace vacation start and end time */
+ if($this->mailMethod->vacationRangeEnabled()){
+ if(preg_match("/%start/",$contents)){
+ $contents = preg_replace("/%start/",$this->gosaVacationStart,$contents);
+ }
+ if(preg_match("/%end/",$contents)){
+ $contents = preg_replace("/%end/",$this->gosaVacationStop,$contents);
+ }
+ }else{
+ if(preg_match("/%start/",$contents)){
+ $contents = preg_replace("/%start/", _("unknown"),$contents);
+ }
+ if(preg_match("/%end/",$contents)){
+ $contents = preg_replace("/%end/", _("unknown"), $contents);
+ }
+ }
+
+ foreach ($attrs as $val){
+
+ // We can only replace strings here
+ if(!is_string($obj->$val)) continue;
+
+ if(preg_match("/dateOfBirth/",$val)){
+ if($obj->use_dob){
+ $contents= preg_replace("/%$val/",date("Y-d-m",$obj->dateOfBirth),$contents);
+ }
+ }else {
+ $contents= preg_replace("/%$val/",
+ $obj->$val, $contents);
+ }
+
+ }
+ }
+ $contents = ltrim(preg_replace("/^DESC:.*$/m","",$contents),"\n ");
+ return($contents);
+ }
+
+
+ function remove_from_parent()
+ {
+ /* Cancel if there's nothing to do here */
+ if (!$this->initially_was_account){
+ return;
+ }
+
+ }
+
+
+ function save()
+ {
+ }
+
+
+ /*! \brief Check given values
+ */
+ function check()
+ {
+ if(!$this->is_account){
+ return(array());
+ }
+
+ $ldap= $this->config->get_ldap_link();
+
+ /* Call common method to give check the hook */
+ $message= plugin::check();
+
+ if(empty($this->gosaMailServer)){
+ $message[]= msgPool::noserver(_("Mail"));
+ }
+
+ /* Mail address checks */
+ $mail = $this->mail;
+ if(!(!$this->mailMethod->isModifyableMail() && $this->initially_was_account)){
+
+ if($this->mailMethod->domainSelectionEnabled()){
+ $mail.= "@".$this->mailDomainPart;
+ }
+
+ if (empty($mail)){
+ $message[]= msgPool::required(_("Primary address"));
+ }
+ if ($this->is_template){
+ if (!tests::is_email($mail, TRUE)){
+ $message[]= msgPool::invalid(_("Mail address"),"","","%givenName.%sn@your-domain.com");
+ }
+ } else {
+ if (!tests::is_email($mail)){
+ $message[]= msgPool::invalid(_("Mail address"),"","","your-address@your-domain.com");
+ }
+ }
+
+ /* Check if this mail address is already in use */
+ $ldap->cd($this->config->current['BASE']);
+ $filter = "(&(!(objectClass=gosaUserTemplate))(!(uid=".$this->uid."))".
+ "(objectClass=gosaMailAccount)".
+ "(|(mail=".$mail.")(alias=".$mail.")(gosaMailAlternateAddress=".$mail.")))";
+ $ldap->search($filter,array("uid", "cn"));
+ if ($ldap->count() != 0){
+ $entry= $ldap->fetch();
+ $addon= "";
+ if (!isset($entry['uid'])) {
+ $addon= sprintf(_("Address is already in use by group '%s'."), $entry['cn'][0]);
+ } else {
+ $addon= sprintf(_("Address is already in use by user '%s'."), $entry['uid'][0]);
+ }
+ $message[]= msgPool::duplicated(_("Mail address"))."<br><br><i>$addon</i>";
+ }
+ }
+
+
+ /* Check quota */
+ if ($this->gosaMailQuota != '' && $this->acl_is_writeable("gosaMailQuota")){
+ if (!is_numeric($this->gosaMailQuota)) {
+ $message[]= msgPool::invalid(_("Quota size"),$this->gosaMailQuota,"/^[0-9]*/");
+ } else {
+ $this->gosaMailQuota= (int) $this->gosaMailQuota;
+ }
+ }
+
+ /* Check rejectsize for integer */
+ if ($this->gosaMailMaxSize != '' && $this->acl_is_writeable("gosaMailMaxSize")){
+ if (!is_numeric($this->gosaMailMaxSize)){
+ $message[]= msgPool::invalid(_("Mail reject size"),$this->gosaMailMaxSize,"/^[0-9]*/");
+ } else {
+ $this->gosaMailMaxSize= (int) $this->gosaMailMaxSize;
+ }
+ }
+
+ /* Need gosaMailMaxSize if use_mailsize_limit is checked */
+ if (is_integer(strpos($this->gosaMailDeliveryMode, "R")) && $this->gosaMailMaxSize == ""){
+ $message[]= msgPool::required(_("Mail reject size"));
+ }
+
+ if((preg_match("/S/", $this->gosaMailDeliveryMode))&&(empty($this->gosaSpamMailbox))) {
+ $message[]= msgPool::required(_("Spam folder"));
+ }
+
+ if ($this->mailMethod->vacationRangeEnabled() && preg_match('/V/', $this->gosaMailDeliveryMode)){
+
+ /* Check date strings */
+ $state= true;
+ if ($this->gosaVacationStart == "" || !tests::is_date($this->gosaVacationStart)) {
+ $message[]= msgPool::invalid(_("from"),$this->gosaVacationStart);
+ $state= false;
+ }
+ if ($this->gosaVacationStart == "" || !tests::is_date($this->gosaVacationStop)) {
+ $message[]= msgPool::invalid(_("to"),$this->gosaVacationStop);
+ $state= false;
+ }
+
+#TODO: take care of date format
+ if ($state) {
+ list($day, $month, $year)= explode('.', $this->gosaVacationStart);
+ $start= mktime(0,0,0,$month, $day, $year);
+ list($day, $month, $year)= explode('.', $this->gosaVacationStop);
+ $stop= mktime(0,0,0,$month, $day, $year);
+ if($start > $stop){
+ $message[]= msgPool::invalid(_("Vacation interval"));
+ }
+ }
+ }
+ return($message);
+ }
+
+
+ /*! \brief Adapt from template, using 'dn'
+ */
+ function adapt_from_template($dn, $skip= array())
+ {
+ plugin::adapt_from_template($dn, $skip);
+
+ }
+
+
+ /*! \brief ACL settings
+ */
+ static function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Mail"),
+ "plDescription" => _("Mail settings"),
+ "plSelfModify" => TRUE,
+ "plDepends" => array("user"), // This plugin depends on
+ "plPriority" => 4, // Position in tabs
+ "plSection" => array("personal" => _("My account")),
+ "plCategory" => array("users"),
+ "plOptions" => array(),
+ "plProvidedAcls" => array()
+ ));
+ }
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/groupware/personal/groupware/generic.tpl b/gosa-plugins/groupware/personal/groupware/generic.tpl
--- /dev/null
@@ -0,0 +1,192 @@
+<table summary="{t}Mail settings{/t}" style='width:100%;'>
+ <tr>
+ <td style='width:50%; '>
+ <h3>{t}Generic{/t}</h3>
+ <table summary="{t}Mail address configuration{/t}">
+ <tr>
+ <td><label for="mailAddress">{t}Primary address{/t}</label>{$must}</td>
+ <td><input type='text' id="mailAddress" name="mailAddress" value="{$mailAddress}"></td>
+ </tr>
+ <tr>
+ <td><label for="mailLocation">{t}Account location{/t}</label></td>
+ <td>
+ <select size="1" id="mailLocation" name="mailLocation"
+ title="{t}Specify the location for the mail account{/t}">
+ {html_options values=$mailLocations output=$mailLocations selected=$mailLocation}
+ <option disabled> </option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Quota usage{/t}</td>
+ <td>{$quotaUsage}</td>
+ </tr>
+ <tr>
+ <td><label for="quotaSize">{t}Quota size{/t}</label></td>
+ <td><input type='text' id="quotaSize" name="quotaSize" value="{$quotaSize}"> MB</td>
+ </tr>
+ <tr>
+ <td><label for="mailFilter">{t}Mail filter{/t}</label></td>
+ <td><button name='configureFilter'>{t}Configure filter{/t}</button></td>
+ </tr>
+ </table>
+
+ </td>
+ <td class='left-border'> </td>
+ <td>
+ <h3><label for="alternateAddressList">{t}Alternative addresses{/t}</label></h3>
+ <select id="alternateAddressList" style="width:100%;height:100px;" name="alternateAddressList[]" size="15" multiple
+ title="{t}List of alternative mail addresses{/t}">
+ {html_options values=$alternateAddresses output=$alternateAddresses}
+ <option disabled> </option>
+ </select>
+ <br />
+ <input type='text' name="alternateAddressInput">
+ <button type='submit' name='addAlternateAddress'>{msgPool type=addButton}</button>
+ <button type='submit' name='deleteAlternateAddress'>{msgPool type=delButton}</button>
+ </td>
+ </tr>
+</table>
+<hr>
+
+<table>
+ <tr>
+ <td style='width:50%'>
+
+ <h3><label for="vacationMessage">{t}Vacation message{/t}</label></h3>
+
+ <table summary="{t}Spam filter configuration{/t}">
+ <tr>
+ <td style='width:20px;'>
+ <input type=checkbox name="vacationEnabled" value="1" {$vacationEnabled}
+ id="vacationEnabled"
+ title="{t}Select to automatically response with the vacation message defined below{/t}"
+ class="center"
+ onclick="changeStates()">
+ </td>
+ <td colspan="4">
+ {t}Activate vacation message{/t}
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td style='width:30px;'>{t}from{/t}</td>
+ <td>
+ <input type="text" id="vacationStart" name="vacationStart" class="date"
+ style='width:100px' value="{$vacationStart}">
+ <script type="text/javascript">
+ {literal}
+ var datepicker = new DatePicker({
+ relative : 'vacationStart',
+ language : '{/literal}{$lang}{literal}',
+ keepFieldEmpty : true,
+ enableCloseEffect : false,
+ enableShowEffect : false });
+ {/literal}
+ </script>
+ </td>
+ <td style='width:30px;'>{t}till{/t}</td>
+ <td>
+ <input type="text" id="vacationStop" name="vacationStop" class="date"
+ style='width:100px' value="{$vacationStop}"></div>
+ <script type="text/javascript">
+ {literal}
+ var datepicker2 = new DatePicker({
+ relative : 'vacationStop',
+ language : '{/literal}{$lang}{literal}',
+ keepFieldEmpty : true,
+ enableCloseEffect : false,
+ enableShowEffect : false });
+ {/literal}
+ </script>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=5>
+ <textarea id="vacationMessage" style="width:99%; height:100px;"
+ name="vacationMessage" rows="4" cols="512">{$vacationMessage}</textarea>
+ <br>
+ {if $displayTemplateSelector eq "true"}
+ <select id='vacation_template' name="vacation_template" size=1>
+ {html_options options=$vacationTemplates selected=$vacationTemplate}
+ <option disabled> </option>
+ </select>
+ <button type='submit' name='import_vacation' id="import_vacation">{t}Import{/t}</button>
+ {/if}
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ <td class='left-border'> </td>
+ <td>
+ <h3><label for="forwardingAddressList">{t}Forward messages to{/t}</label></h3>
+ <select id="forwardingAddressList" style="width:100%; height:100px;" name="forwardingAddressList[]" size=15 multiple>
+ {html_options values=$forwardingAddresses output=$forwardingAddresses}
+ <option disabled> </option>
+ </select>
+ <br>
+ <input type='text' id='forwardingAddressInput' name="forwardingAddressInput">
+ <button type='submit' name='addForwardingAddress' id="addForwardingAddress">{msgPool type=addButton}</button>
+ <button type='submit' name='addLocalForwardingAddress' id="addLocalForwardingAddress">{t}Add local{/t}</button>
+ <button type='submit' name='deleteForwardingAddress' id="deleteForwardingAddress">{msgPool type=delButton}</button>
+
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<h3>{t}Mailbox options{/t}</h3>
+<table summary="{t}Flags{/t}">
+ <tr>
+ <td>
+ <input id='mailBoxWarnLimitEnabled' value='1' name="mailBoxWarnLimitEnabled" value="1"
+ {if $mailBoxWarnLimitEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailBoxWarnLimitValue">{t}Warn user about a full mailbox when it reaches{/t}</label>
+ <input id="mailBoxWarnLimitValue" name="mailBoxWarnLimitValue"
+ size="6" align="middle" type='text' value="{$mailBoxWarnLimitValue}" class="center"> {t}MB{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='mailBoxSendSizelimitEnabled' value='1' name="mailBoxSendSizelimitEnabled" value="1"
+ {if $mailBoxSendSizelimitEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailBoxSendSizelimitValue">{t}Refuse incoming mails when mailbox size reaches{/t}</label>
+ <input id="mailBoxSendSizelimitValue" name="mailBoxSendSizelimitValue"
+ size="6" align="middle" type='text' value="{$mailBoxSendSizelimitValue}" class="center"> {t}MB{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='mailBoxHardSizelimitEnabled' value='1' name="mailBoxHardSizelimitEnabled" value="1"
+ {if $mailBoxHardSizelimitEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailBoxHardSizelimitValue">{t}Refuse to send and receive mails when mailbox size reaches{/t}</label>
+ <input id="mailBoxHardSizelimitValue" name="mailBoxHardSizelimitValue"
+ size="6" align="middle" type='text' value="{$mailBoxHardSizelimitValue}" class="center"> {t}MB{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='mailBoxAutomaticRemovalEnabled' value='1' name="mailBoxAutomaticRemovalEnabled" value="1"
+ {if $mailBoxAutomaticRemovalEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailBoxAutomaticRemovalValue">{t}Remove mails older than {/t}</label>
+ <input id="mailBoxAutomaticRemovalValue" name="mailBoxAutomaticRemovalValue"
+ size="6" align="middle" type='text' value="{$mailBoxAutomaticRemovalValue}" class="center"> {t}days{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='only_local' type=checkbox name="only_local" value="1"
+ title="{t}Select if user can only send and receive inside his own domain{/t}" class="center">
+ {t}User is only allowed to send and receive local mails{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='drop_own_mails' type=checkbox name="drop_own_mails" value="1"
+ title="{t}Select if you want to forward mails without getting own copies of them{/t}">
+ {t}No delivery to own mailbox{/t}
+ </td>
+ </tr>
+</table>
diff --git a/gosa-plugins/groupware/plugin.dsc b/gosa-plugins/groupware/plugin.dsc
--- /dev/null
@@ -0,0 +1,7 @@
+[gosa-plugin]
+name = groupware
+description = "Groupware management base plugin"
+version = 2.7
+author = "Fabian Hickert <hickert@gonicus.de>"
+maintainer = "GOsa packages maintainers group <gosa-pkg@oss.gonicus.de>"
+homepage = https://oss.gonicus.de/labs/gosa/