*/ unset($info); $dn="uid=$username,ou=People,domain=$domain,ou=Domains,$basedn"; if($vacation){ /* FIXME: vacationMsg should be removed if the text is * empty */ if (!$vacationmsg) $vacationmsg = "."; if($vacationstatus){ // Add vacation and vacation_msg. $info["vacation"] = "true"; $info["vacationmsg"] = utf8_encode($vacationmsg); if(ldap_modify ($ds, $dn, $info)) $status ="Vacation activated and updated."; else $status ="Error: $vacationmsg"; } else{ // Remove vacation and update vacation_msg $info["vacationmsg"] = utf8_encode($vacationmsg); if (ldap_modify ($ds, $dn, $info)) $status = "Vacation deactivated and updated."; else $status = "Error updating vacation info."; /* delete "vacation" */ $sr = ldap_search($ds, $dn, "(vacation=true)"); if (ldap_get_entries($ds, $sr)){ unset($info); $info["vacation"] = "true"; ldap_mod_del ($ds, $dn, $info); } } } elseif($forward) { // add forward if(!preg_match("/@/", $forward)){ //The forward entry in ldap needs the domain part $forward = $forward . "@" . $domain; } if (!preg_match("/^[a-zA-Z0-9]+[a-zA-Z0-9\._-]*@[a-zA-Z0-9\._-]+$/", $forward)){ $status = "Illegal address '$forward'"; } else { $info["forward"] = $forward; ldap_mod_add ($ds, $dn, $info); $status ="Forward added."; } } elseif($delfwdname) { // Delete forward unset($info); $info["forward"] = $delfwdname; ldap_mod_del ($ds, $dn, $info); $status ="Forward deleted."; } unset($info); $dn ="uid=$username, ou=People, domain=$domain,ou=Domains, $basedn"; $filter="(objectClass=mailaccount)"; $sr=ldap_search($ds,$dn,$filter); $info = ldap_get_entries($ds, $sr); ?>
Forward
Add:
" valign="top">
  • Forward your mail to one or more addresses by entering them in the 'Forward' area.
  • If you want to leave a copy on the limacute server, forward to @
  • Let Limacute answer your mails automatically while you are on vacation.
  • Enable vacation messages and enter the message to send to people who send mail to your account.
  • Make sure you disable vacation messages when you are back from vacation!
  "> ">
Alias
   
Vacation:
Vacation "; else echo ""; ?>
Vacation msg: "; echo utf8_decode($info[0]["vacationmsg"][0]); echo ""; ?>
Status: