Anchor the regexp. Thanks Thijs Kinkhorst.
[squirrelmail.git] / class / deliver / Deliver_SMTP.class.php
index 279b82cc8204592603e99e5a7da5685e28b0ec06..2d0aa966078ca15649a34fbfe82323fa429599c6 100644 (file)
@@ -137,7 +137,7 @@ class Deliver_SMTP extends Deliver {
 
         // if the host is an IPv4 address, enclose it in brackets
         //
 
         // if the host is an IPv4 address, enclose it in brackets
         //
-        if (preg_match('/\d+\.\d+\.\d+\.\d+/', $helohost))
+        if (preg_match('/^\d+\.\d+\.\d+\.\d+$/', $helohost))
             $helohost = '[' . $helohost . ']';
 
         /* Lets introduce ourselves */
             $helohost = '[' . $helohost . ']';
 
         /* Lets introduce ourselves */