openmailadmin  1.0.1
About: Openmailadmin is a administration interface to every complete IMAP mail server daemon.
  Fossies Dox: openmailadmin-1.0.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

openmailadmin Class Reference

Public Member Functions

 __construct (ADOConnection $adodb_handler, array $tablenames, array $cfg, IMAP_Administrator $imap)
 
 get_user_row ($mailbox)
 
 get_valid_destinations ($possible)
 
 get_domain_set ($user, $categories, $cache=true)
 
 user_is_descendant ($child, $parent, $levels=7, $cache=array())
 
 user_get_used_alias ($username)
 
 user_get_used_regexp ($username)
 
 user_get_number_mailboxes ($username)
 
 user_get_number_domains ($username)
 
 get_addresses ()
 
 address_create ($alias, $domain, $arr_destinations)
 
 address_delete ($arr_addresses)
 
 address_change_destination ($arr_addresses, $arr_destinations)
 
 address_toggle_active ($arr_addresses)
 
 get_domains ()
 
 domain_check (User $reference, $tobechecked, $domain_key)
 
 domain_add ($domain, $props)
 
 domain_remove ($domains)
 
 domain_change ($domains, $change, $data)
 
 user_change_password ($new, $new_repeat, $old_passwd=null)
 
 get_regexp ($match_against=null)
 
 regexp_create ($regexp, $arr_destinations)
 
 regexp_delete ($arr_regexp_ids)
 
 regexp_change_destination ($arr_regexp_ids, $arr_destinations)
 
 regexp_toggle_active ($arr_regexp_ids)
 
 get_mailboxes ()
 
 get_selectable_paten ($whose)
 
 mailbox_create ($mboxname, $props)
 
 mailbox_change ($mboxnames, $change, $props)
 
 mailbox_delete ($mboxnames)
 
 mailbox_toggle_active ($mboxnames)
 

Public Attributes

 $current_user
 
 $authenticated_user
 
 $imap
 
const regex_valid_alias = '(?=^.{1,64}$)[a-z0-9]+(?:(?<![!$+\-_.])[!$+\-_.][a-z0-9]+)*'
 
const regex_valid_email = '[a-z0-9]+(?:(?<![!$+\-_.])[!$+\-_.][a-z0-9]+)*@(?:(?:(?![.-])[a-z0-9\-]{1,63}(?<!-)\.?)+(?:(?<!\.)\.[a-z]{2,}))'
 
const regex_valid_domain = '(?=^.{1,254}$)(?:^localhost$)|(?:^(?:(?![.-])[a-z0-9\-]{1,63}(?<!-)\.?)+(?:(?<!\.)\.[a-z]{2,})$)'
 
 $editable_domains
 

Protected Attributes

 $ErrorHandler
 

Private Member Functions

 rollback ($what)
 
 get_mailbox_names ()
 
 user_invalidate_domain_sets ()
 
 mailbox_filter_manipulable ($who, $desired_mboxes)
 

Private Attributes

 $db
 
 $validator
 
 $tablenames
 
 $cfg
 

Detailed Description

This class collects all methods of Openmailadmin, except for the view and data storage.

Definition at line 6 of file openmailadmin.php.

Constructor & Destructor Documentation

◆ __construct()

openmailadmin::__construct ( ADOConnection  $adodb_handler,
array  $tablenames,
array  $cfg,
IMAP_Administrator  $imap 
)

Definition at line 24 of file openmailadmin.php.

References $cfg, $imap, $tablenames, and ErrorHandler\getInstance().

Member Function Documentation

◆ address_change_destination()

openmailadmin::address_change_destination (   $arr_addresses,
  $arr_destinations 
)

Definition at line 338 of file openmailadmin.php.

References ErrorHandler\add_error(), current_user, db_find_in_set(), and txt().

◆ address_create()

openmailadmin::address_create (   $alias,
  $domain,
  $arr_destinations 
)

◆ address_delete()

openmailadmin::address_delete (   $arr_addresses)

◆ address_toggle_active()

openmailadmin::address_toggle_active (   $arr_addresses)

Definition at line 366 of file openmailadmin.php.

References ErrorHandler\add_error(), and db_find_in_set().

◆ domain_add()

openmailadmin::domain_add (   $domain,
  $props 
)

◆ domain_change()

openmailadmin::domain_change (   $domains,
  $change,
  $data 
)

◆ domain_check()

openmailadmin::domain_check ( User  $reference,
  $tobechecked,
  $domain_key 
)

May the new user only select from domains which have been assigned to the reference user? If so, return true.

Parameters
referenceInstance of User
tobecheckedMailbox-name.

Definition at line 427 of file openmailadmin.php.

References ErrorHandler\add_error(), get_domain_set(), and txt().

◆ domain_remove()

openmailadmin::domain_remove (   $domains)

◆ get_addresses()

openmailadmin::get_addresses ( )

Definition at line 223 of file openmailadmin.php.

References $alias, current_user, and txt().

◆ get_domain_set()

openmailadmin::get_domain_set (   $user,
  $categories,
  $cache = true 
)

Definition at line 104 of file openmailadmin.php.

Referenced by domain_check().

◆ get_domains()

openmailadmin::get_domains ( )

◆ get_mailbox_names()

openmailadmin::get_mailbox_names ( )
private

Definition at line 49 of file openmailadmin.php.

Referenced by get_valid_destinations().

◆ get_mailboxes()

openmailadmin::get_mailboxes ( )

Definition at line 759 of file openmailadmin.php.

References $mailboxes, current_user, and user_get_number_mailboxes().

◆ get_regexp()

openmailadmin::get_regexp (   $match_against = null)

Definition at line 634 of file openmailadmin.php.

References current_user, and txt().

◆ get_selectable_paten()

openmailadmin::get_selectable_paten (   $whose)

Definition at line 795 of file openmailadmin.php.

References authenticated_user.

◆ get_user_row()

openmailadmin::get_user_row (   $mailbox)

Definition at line 65 of file openmailadmin.php.

◆ get_valid_destinations()

openmailadmin::get_valid_destinations (   $possible)

Definition at line 73 of file openmailadmin.php.

References $mailboxes, current_user, get_mailbox_names(), regex_valid_email, and txt().

◆ mailbox_change()

openmailadmin::mailbox_change (   $mboxnames,
  $change,
  $props 
)

◆ mailbox_create()

openmailadmin::mailbox_create (   $mboxname,
  $props 
)

◆ mailbox_delete()

openmailadmin::mailbox_delete (   $mboxnames)

◆ mailbox_filter_manipulable()

openmailadmin::mailbox_filter_manipulable (   $who,
  $desired_mboxes 
)
private

◆ mailbox_toggle_active()

openmailadmin::mailbox_toggle_active (   $mboxnames)

◆ regexp_change_destination()

openmailadmin::regexp_change_destination (   $arr_regexp_ids,
  $arr_destinations 
)

Definition at line 721 of file openmailadmin.php.

References ErrorHandler\add_error(), current_user, and db_find_in_set().

◆ regexp_create()

openmailadmin::regexp_create (   $regexp,
  $arr_destinations 
)

Definition at line 673 of file openmailadmin.php.

References ErrorHandler\add_error(), current_user, and txt().

◆ regexp_delete()

openmailadmin::regexp_delete (   $arr_regexp_ids)

◆ regexp_toggle_active()

openmailadmin::regexp_toggle_active (   $arr_regexp_ids)

Definition at line 738 of file openmailadmin.php.

References ErrorHandler\add_error(), and db_find_in_set().

◆ rollback()

openmailadmin::rollback (   $what)
private

Definition at line 36 of file openmailadmin.php.

Referenced by mailbox_create().

◆ user_change_password()

openmailadmin::user_change_password (   $new,
  $new_repeat,
  $old_passwd = null 
)

Changes the current user's password. This requires the former password for authentication if current user and authenticated user are the same.

Definition at line 606 of file openmailadmin.php.

References ErrorHandler\add_error(), ErrorHandler\add_info(), current_user, Password\is_secure(), and txt().

◆ user_get_number_domains()

openmailadmin::user_get_number_domains (   $username)

Definition at line 203 of file openmailadmin.php.

Referenced by get_domains().

◆ user_get_number_mailboxes()

openmailadmin::user_get_number_mailboxes (   $username)

Definition at line 193 of file openmailadmin.php.

Referenced by get_mailboxes().

◆ user_get_used_alias()

openmailadmin::user_get_used_alias (   $username)

Definition at line 171 of file openmailadmin.php.

Referenced by mailbox_change().

◆ user_get_used_regexp()

openmailadmin::user_get_used_regexp (   $username)

Definition at line 182 of file openmailadmin.php.

◆ user_invalidate_domain_sets()

openmailadmin::user_invalidate_domain_sets ( )
private

Definition at line 213 of file openmailadmin.php.

Referenced by domain_add(), domain_change(), and domain_remove().

◆ user_is_descendant()

openmailadmin::user_is_descendant (   $child,
  $parent,
  $levels = 7,
  $cache = array() 
)

Definition at line 134 of file openmailadmin.php.

Referenced by mailbox_filter_manipulable().

Member Data Documentation

◆ $authenticated_user

openmailadmin::$authenticated_user

Definition at line 9 of file openmailadmin.php.

◆ $cfg

openmailadmin::$cfg
private

Definition at line 16 of file openmailadmin.php.

Referenced by __construct().

◆ $current_user

openmailadmin::$current_user

Definition at line 8 of file openmailadmin.php.

◆ $db

openmailadmin::$db
private

Definition at line 11 of file openmailadmin.php.

◆ $editable_domains

openmailadmin::$editable_domains

Definition at line 382 of file openmailadmin.php.

Referenced by get_domains().

◆ $ErrorHandler

openmailadmin::$ErrorHandler
protected

Definition at line 13 of file openmailadmin.php.

◆ $imap

openmailadmin::$imap

Definition at line 17 of file openmailadmin.php.

Referenced by __construct().

◆ $tablenames

openmailadmin::$tablenames
private

Definition at line 15 of file openmailadmin.php.

Referenced by __construct().

◆ $validator

openmailadmin::$validator
private

Definition at line 12 of file openmailadmin.php.

◆ regex_valid_alias

const openmailadmin::regex_valid_alias = '(?=^.{1,64}$)[a-z0-9]+(?:(?<![!$+\-_.])[!$+\-_.][a-z0-9]+)*'

Definition at line 20 of file openmailadmin.php.

Referenced by address_create().

◆ regex_valid_domain

const openmailadmin::regex_valid_domain = '(?=^.{1,254}$)(?:^localhost$)|(?:^(?:(?![.-])[a-z0-9\-]{1,63}(?<!-)\.?)+(?:(?<!\.)\.[a-z]{2,})$)'

Definition at line 22 of file openmailadmin.php.

◆ regex_valid_email

const openmailadmin::regex_valid_email = '[a-z0-9]+(?:(?<![!$+\-_.])[!$+\-_.][a-z0-9]+)*@(?:(?:(?![.-])[a-z0-9\-]{1,63}(?<!-)\.?)+(?:(?<!\.)\.[a-z]{2,}))'

Definition at line 21 of file openmailadmin.php.

Referenced by get_valid_destinations().


The documentation for this class was generated from the following file: