Skip to content

Commit 5335a40

Browse files
author
Marius Cramer
committed
Fixed: FS#3474 - Mail plugins do not load files from conf-custom
1 parent 7e61904 commit 5335a40

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

server/plugins-available/getmail_plugin.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ function update($event_name, $data) {
100100

101101
if($data["new"]["active"] == 'y') {
102102
// Open master template
103-
$tpl = file_get_contents($conf["rootpath"].'/conf/getmail.conf.master');
103+
if(file_exists($conf["rootpath"].'/conf-custom/getmail.conf.master')) {
104+
$tpl = file_get_contents($conf["rootpath"].'/conf-custom/getmail.conf.master');
105+
} else {
106+
$tpl = file_get_contents($conf["rootpath"].'/conf/getmail.conf.master');
107+
}
104108

105109
// Shall emails be deleted after retrieval
106110
if($data["new"]["source_delete"] == 'y') {

server/plugins-available/maildrop_plugin.inc.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ function update($event_name, $data) {
137137
}
138138

139139
// Load the master template
140-
$tpl = file_get_contents($conf["rootpath"].'/conf/autoresponder.master');
140+
if(file_exists($conf["rootpath"].'/conf-custom/autoresponder.master')) {
141+
$tpl = file_get_contents($conf["rootpath"].'/conf-custom/autoresponder.master');
142+
} else {
143+
$tpl = file_get_contents($conf["rootpath"].'/conf/autoresponder.master');
144+
}
141145
$tpl = str_replace('{vmail_mailbox_base}', $mail_config["homedir_path"], $tpl);
142146

143147
if ($data["new"]["autoresponder_start_date"] != '0000-00-00 00:00:00') { // Dates have been set
@@ -201,7 +205,11 @@ function update($event_name, $data) {
201205
}
202206

203207
if($data["new"]["move_junk"] == 'y') {
204-
$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
208+
if(file_exists($conf["rootpath"].'/conf-custom/mailfilter_move_junk.master')) {
209+
$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf-custom/mailfilter_move_junk.master')."\n";
210+
} else {
211+
$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
212+
}
205213
}
206214
$mailfilter_content .= $data["new"]["custom_mailfilter"];
207215

0 commit comments

Comments
 (0)