Till Brehm
2016-06-29 56a9c765e6409900ed3b9225be839bf6200260ae
Replace Windows line breaks with Unix line breaks in custom mail filters.
2 files modified
4 ■■■■ changed files
server/plugins-available/maildeliver_plugin.inc.php 2 ●●● patch | view | raw | blame | history
server/plugins-available/maildrop_plugin.inc.php 2 ●●● patch | view | raw | blame | history
server/plugins-available/maildeliver_plugin.inc.php
@@ -132,7 +132,7 @@
            // Custom filters
            if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = '';
            $tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]);
            $tpl->setVar('custom_mailfilter', str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]));
            // Move junk
            $tpl->setVar('move_junk', $data["new"]["move_junk"]);
server/plugins-available/maildrop_plugin.inc.php
@@ -211,7 +211,7 @@
                        $mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
                    }
                }
                $mailfilter_content .= $data["new"]["custom_mailfilter"];
                $mailfilter_content .= str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]);
                // Replace windows linebreaks in mailfilter file
                $mailfilter_content = str_replace("\r\n", "\n", $mailfilter_content);