Nemo bis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/212907

Change subject: Match a delivery status code separated by space
......................................................................

Match a delivery status code separated by space

E.g. ^...: 421 4.4.0 [internal] no MXs for this domain could be reached at this 
time

Bug: T99767
Change-Id: I29fd8492178a586490ea5d36bd525e8e3e9e4039
---
M includes/ProcessBounceWithRegex.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler 
refs/changes/07/212907/1

diff --git a/includes/ProcessBounceWithRegex.php 
b/includes/ProcessBounceWithRegex.php
index 9356195..66614f8 100644
--- a/includes/ProcessBounceWithRegex.php
+++ b/includes/ProcessBounceWithRegex.php
@@ -104,7 +104,7 @@
                // of the message for a SMTP status code
                if ( !isset( $emailHeaders['status'] ) && !isset( 
$emailHeaders['x-failed-recipients'] ) ) {
                        foreach ( $emailLines as $emailLine ) {
-                               if ( preg_match( 
'/^\s*(?:(?P<smtp>[1-5]\d{2})[^\d\w.]+)?' .
+                               if ( preg_match( 
'/^\s*(?:(?P<smtp>[1-5]\d{2})[^\d\w.- ]+)?' .
                                        
'(?P<status>[245]\.\d{1,3}\.\d{1,3})?\b/', $emailLine, $statusMatch ) ) {
                                        if ( isset( $statusMatch['smtp'] ) ) {
                                                $emailHeaders['smtp-code'] = 
$statusMatch['smtp'];

-- 
To view, visit https://gerrit.wikimedia.org/r/212907
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29fd8492178a586490ea5d36bd525e8e3e9e4039
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <federicol...@tiscali.it>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to