class_mailPluginConfig.inc 2.89 KB
Newer Older
1
2
3
<?php
/*
  This code is part of FusionDirectory (http://www.fusiondirectory.org/)
4
  Copyright (C) 2012-2016 FusionDirectory
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/

class mailPluginConfig extends simplePlugin
{
23
  static function plInfo (): array
24
  {
25
    return [
26
27
      'plShortName'     => _('Mail'),
      'plDescription'   => _('Mail plugin configuration'),
28
      'plPriority'      => 6,
29
30
      'plObjectClass'   => ['fdMailPluginConf'],
      'plObjectType'    => ['configuration'],
31

32
      'plProvidedAcls'  => parent::generatePlProvidedAcls(static::getAttributesInfo())
33
    ];
34
35
  }

36
  static function getAttributesInfo (): array
37
  {
38
39
    return [
      'mail' => [
40
        'name'  => _('Mail settings'),
41
        'attrs' => [
42
          new SelectAttribute(
43
44
45
            _('Account identification attribute'),
            _('Which attribute will be used to create accounts.'),
            'fdMailAttribute', TRUE,
46
            ['mail', 'uid']
47
          ),
48
          new StringAttribute(
49
50
            _('User account template'),
            _('Override the user account creation syntax. Default is %PREFIX%%UATTRIB%.'),
51
52
            'fdMailUserCreation'
          ),
53
          new StringAttribute(
54
55
            _('Group account template'),
            _('Override the group account creation syntax. Default is %PREFIX%%UATTRIB%.'),
56
57
            'fdMailFolderCreation'
          ),
58
          new BooleanAttribute(
59
60
61
62
            _('Delete mailbox on account deletion'),
            _('Determines if the mailbox should be removed from your IMAP server after the account is deleted in LDAP.'),
            'fdCyrusDeleteMailbox'
          ),
63
64
          new SetAttribute(
            new StringAttribute(
65
66
67
68
69
              _('Cyrus autocreate folders'),
              _('List of personal IMAP folders that should be created along initial account creation.'),
              'fdCyrusAutocreateFolders'
            )
          ),
70
          new IntAttribute(
71
72
73
74
75
            _('IMAP timeout'),
            _('Sets the connection timeout for imap actions.'),
            'fdImapTimeout', FALSE,
            0, FALSE
          ),
76
          new StringAttribute(
77
78
79
80
            _('Shared prefix'),
            _('Prefix to add for mail shared folders.'),
            'fdMailSharedPrefix'
          ),
81
82
83
        ]
      ],
    ];
84
85
  }
}