Skip to content

Commit b6912ff

Browse files
committed
Fixed: FS#1298 - mailfilter saving file in DOS format causing script to error
1 parent b0dec8d commit b6912ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/plugins-available/maildrop_plugin.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ function update($event_name,$data) {
196196
}
197197
$mailfilter_content .= $data["new"]["custom_mailfilter"];
198198

199+
// Replace windows linebreaks in mailfilter file
200+
$mailfilter_content = str_replace("\r\n","\n",$mailfilter_content);
201+
199202
file_put_contents($config_file_path,$mailfilter_content);
200203
$app->log("Writing new custom Mailfiter".$config_file_path,LOGLEVEL_DEBUG);
201204
chmod($config_file_path, 0770);

0 commit comments

Comments
 (0)