[Mimedefang] Bug in get_smtp_return_code()

Guido mimedefang.at.lists.roaringpenguin.com at starbase12.cjb.net
Thu Sep 16 13:16:05 EDT 2004


Hi all,

I just found out that there seems to be a faulty regular expression in 
MIMEDefang's get_smtp_return_code() sub.

Lines consisting of only a 3 digit reply code are being allowed, but $code 
will stay unset.

Here's a patch:

--- ./mimedefang-2.45-BETA-4.orig/mimedefang.pl.in      2004-09-14 
16:03:24.000000000 +0200 
+++ ./mimedefang-2.45-BETA-4/mimedefang.pl.in   2004-09-16 12:08:02.302701081 
+0200 
@@ -6535,7 +6535,7 @@ 
       # Chew up all white space, including CR 
       $line =~ s/\s+$//; 
       if (($line =~ /^\d\d\d$/) or ($line =~ /^\d\d\d\s/)) { 
-           $line =~ /^(\d\d\d)\s+(.*)$/; 
+           $line =~ /^(\d\d\d)\s*(.*)$/; 
           $code = $1; 
           $text = $2; 
           # Check for DSN 


Thanks,
Kind regards,

Guido

-- 
He who slings mud generally loses ground.
		-- Adlai Stevenson



More information about the MIMEDefang mailing list