bugZoneCheck - Bugs: bug #15228, SMTP test: Timeout when no SMTP...

 
 

bug #15228: SMTP test: Timeout when no SMTP banner

Submitted by:  Stephane Bortzmeyer <bortzmeyer>
Submitted on:  Fri 16 Dec 2005 02:08:50 PM UTC  
 
Category: testsSeverity: Low
Priority: 5 - NormalItem Group: Action request
Status: Ready For TestPrivacy: Public
Assigned to: Fabien CHABANNE <chabannf>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 25 Jan 2010 10:46:52 AM UTC, comment #3:

To test you can use socat as the server:

socat TCP-LISTEN:25,reuseaddr=1,fork STDOUT

Kim Minh Kaplan <kmkaplan>
Project Administrator
Mon 25 Jan 2010 09:38:43 AM UTC, comment #2:

Wrong comment, the bug is triggered only if the SMTP connection is accepted but no banner is sent. To test, we need a server which accepts TCP connections but sends no banner. Either a custom server or an HTTP server (which has the desired behaviour).

Stephane Bortzmeyer <bortzmeyer>
Project Administrator
Mon 25 Jan 2010 09:33:32 AM UTC, comment #1:

To test the patch it, a possible solution is an iptables rule to drop packets to the SMTP server.

Stephane Bortzmeyer <bortzmeyer>
Project Administrator
Fri 16 Dec 2005 02:08:50 PM UTC, original submission:

When the SMTP server does not respond, Zonecheck gets a timeout. OK. But when the SMTP server sends no welcome banner, there is no timeout.

The following patch, by Romuald at the Gandi registrar, fixes it:

--- zc/mail.rb.0 Thu Dec 15 16:02:12 2005
+++ zc/mail.rb Thu Dec 15 16:02:19 2005
@@ -120,7 +120,13 @@
begin
desc = ""
while true
- line = @mrelay.readline
+ # Fix de Romuald
+ # Timeout ajouté sur les connections SMTP au cas ou le serveur
+ # ne répond pas
+ line = nil
+ Timeout.timeout(10, Timeout::Error) {
+ line = @mrelay.readline
+ }
@dbgio << "<< #{line}" if @dbgio
case line
when NilClass then raise ZCMailError, "parsing error"
@@ -131,6 +137,8 @@
end
rescue EOFError
raise ZCMailError, "Unexpected closing of connection"
+ rescue Timeout::Error
+ raise ZCMailError, "Timeout from SMTP server"
end
# NOT REACHED
end

Stephane Bortzmeyer <bortzmeyer>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chabannf (Updated the item)
  • -unavailable- added by kmkaplan (Posted a comment)
  • -unavailable- added by bortzmeyer (Posted a comment)
  • -unavailable- added by redon (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Jun 2010 02:04:22 PM UTCchabannfOpen/ClosedOpen=>Closed
    Thu 04 Feb 2010 01:03:23 PM UTCchabannfStatusNone=>Ready For Test
    Mon 25 Jan 2010 09:38:43 AM UTCbortzmeyerPriority3 - Low=>5 - Normal
    Tue 19 Jan 2010 09:55:24 AM UTCredonSeverityHigh=>Low
      Priority5 - Normal=>3 - Low
      Assigned toNone=>chabannf

    Back to the top


    Powered by Savane 3.1-cleanup1