From 3a636b5a48da3d19e7f92547e655c9462955bcf3 Mon Sep 17 00:00:00 2001 From: Michael Volz Date: Wed, 5 Jul 2017 13:35:22 +0200 Subject: [PATCH] escape lines starting with dot in smtp client session --- webui/model/mail/mail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webui/model/mail/mail.php b/webui/model/mail/mail.php index ef265a53..ef69f3cf 100644 --- a/webui/model/mail/mail.php +++ b/webui/model/mail/mail.php @@ -12,6 +12,8 @@ class ModelMailMail extends Model { $msg = preg_replace("/Message-ID:([^\n]+)\n/i", "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">\n", $msg); } + $msg = preg_replace("/^\..*$/m", ".$0", $msg); + $r = fsockopen($smtphost, $smtpport); if(!$r){ return -1; }