forked from bhuisgen/rc-vacation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.inc.php
142 lines (108 loc) · 4.57 KB
/
config.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
/*
+-----------------------------------------------------------------------+
| Configuration file for vacation module |
| |
| Copyright (C) 2009 Boris HUISGEN <[email protected]> |
| Licensed under the GNU GPL |
| |
+-----------------------------------------------------------------------+
*/
$rcmail_config = array();
// allow vacation subject
$rcmail_config['vacation_gui_vacationsubject'] = TRUE;
// default vacation subject
$rcmail_config['vacation_gui_vacationsubject_default'] = "Out of office";
// allow HTML for vacation message
$rcmail_config['vacation_gui_vacationmessage_html'] = TRUE;
// default vacation message
$rcmail_config['vacation_gui_vacationmessage_default'] = "I'm currently out of office.";
// driver used for backend storage
$rcmail_config['vacation_driver'] = 'sql';
/*
* SQL driver
*/
// database DSN
$rcmail_config['vacation_sql_dsn'] =
'mysql://user:[email protected]/vacation';
// read data queries
$rcmail_config['vacation_sql_read'] =
array("SELECT subject AS vacation_subject, body AS vacation_message, " .
"active AS vacation_enable FROM vacation " .
"WHERE email=%username AND domain=%email_domain;"
);
// write data queries
$rcmail_config['vacation_sql_write'] =
array("DELETE FROM vacation WHERE email=%email AND " .
"domain=%email_domain;",
"DELETE from vacation_notification WHERE on_vacation=%email;",
"DELETE FROM alias WHERE address=%email AND " .
"domain=%email_domain;",
"INSERT INTO vacation (email,domain,subject,body,created," .
"active) " .
"SELECT %email,%email_domain,%vacation_subject," .
"%vacation_message,NOW(),1 FROM mailbox " .
"WHERE username=%email AND domain=%email_domain AND " .
"%vacation_enable=1;",
"INSERT INTO alias (address,goto,domain,created,modified," .
"active) " .
"SELECT %email,CONCAT(%email_local,'#',%email_domain,'@'," .
"'autoreply.my.domain'),%email_domain,NOW(),NOW(),1 " .
"FROM mailbox WHERE username=%email AND " .
"domain=%email_domain AND %vacation_enable=1;"
);
/*
* LDAP driver
*/
// Server hostname
$rcmail_config['vacation_ldap_host'] = '127.0.0.1';
// Server port
$rcmail_config['vacation_ldap_port'] = 389;
// Use TLS flag
$rcmail_config['vacation_ldap_starttls'] = false;
// Protocol version
$rcmail_config['vacation_ldap_version'] = 3;
// Base DN
$rcmail_config['vacation_ldap_basedn'] = 'dc=ldap,dc=my,dc=domain';
// Bind DN
$rcmail_config['vacation_ldap_binddn'] =
'cn=user,dc=ldap,dc=my,dc=domain';
// Bind password
$rcmail_config['vacation_ldap_bindpw'] = 'pa$$w0rd';
// Attribute name to map email address
$rcmail_config['vacation_ldap_attr_email'] = null;
// Attribute name to map email local part
$rcmail_config['vacation_ldap_attr_emaillocal'] = null;
// Attribute name to map email domain
$rcmail_config['vacation_ldap_attr_emaildomain'] = null;
// Attribute name to map vacation flag
$rcmail_config['vacation_ldap_attr_vacationenable'] = 'vacationActive';
// Attribute value for enabled vacation flag
$rcmail_config['vacation_ldap_attr_vacationenable_value_enabled'] = 'TRUE';
// Attribute value for disabled vacation flag
$rcmail_config['vacation_ldap_attr_vacationenable_value_disabled'] = 'FALSE';
// Attribute name to map vacation subject
$rcmail_config['vacation_ldap_attr_vacationsubject'] = null;
// Attribute name to map vacation message
$rcmail_config['vacation_ldap_attr_vacationmessage'] =
'vacationInfo';
// Search base to read data
$rcmail_config['vacation_ldap_search_base'] =
'cn=%email_local,ou=Mailboxes,dc=%email_domain,ou=MailServer,dc=ldap,' .
'dc=my,dc=domain';
// Search filter to read data
$rcmail_config['vacation_ldap_search_filter'] = '(objectClass=mailAccount)';
// Search attributes to read data
$rcmail_config['vacation_ldap_search_attrs'] = array ('vacationActive', 'vacationInfo');
// array of DN to use for modify operations required to write data.
$rcmail_config['vacation_ldap_modify_dns'] = array (
'cn=%email_local,ou=Mailboxes,dc=%email_domain,ou=MailServer,dc=ldap,dc=my,dc=domain'
);
// array of operations required to write data.
$rcmail_config['vacation_ldap_modify_ops'] = array (
array (
'replace' => array ( 'vacationActive' => '%vacation_enable', 'vacationInfo' => '%vacation_message')
),
);
// end vacation config file
?>