Response Code for Closing Connection

Hi,
Currently when qpsmtpd receives a bare LF or CR it sends a 451
response code and then closes the connection.  I was reading the RFC
(2821) and it seems the correct response code would be 421.  See
section 3.9 (Terminating Sessions and Connections.)

Can anyone tell me why qpsmtpd uses the 451 response code instead?

Another idea is to issue the 451 response code, but instead of
terminating the connection, simply reset the transaction.  This would
allow the connection to be maintained and give the client a second
opportunity to issue the correct session.

Thanks for any insight you can provide.
	-- Robert

-- 
    Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
		 http://www.flarenet.com/consulting/
      * Putting the Service Back in Internet Service Provider *
0
rjkaes
12/19/2003 10:08:01 PM
perl.qpsmtpd 1907 articles. 0 followers. Follow

2 Replies
1342 Views

Similar Articles

[PageSpeed] 19
Get it on Google Play
Get it on Apple App Store

On Dec 19, 2003, at 2:08 PM, Robert James Kaes wrote:

> Hi,
> Currently when qpsmtpd receives a bare LF or CR it sends a 451
> response code and then closes the connection.  I was reading the RFC
> (2821) and it seems the correct response code would be 421.  See
> section 3.9 (Terminating Sessions and Connections.)
>
> Can anyone tell me why qpsmtpd uses the 451 response code instead?

Without looking it up then I'd think that qmail-smtpd does it that way. 
  The first version of qpsmtpd was just a straight port of qmail-smtpd 
behavior.

 From RFC2821:

	421 <domain> Service not available, closing transmission channel
          (This may be a reply to any command if the service knows it
          must shut down)	
	[...]
       451 Requested action aborted: error in processing

Unless someone says otherwise then I think changing it to 421 would 
make sense.

> Another idea is to issue the 451 response code, but instead of
> terminating the connection, simply reset the transaction.  This would
> allow the connection to be maintained and give the client a second
> opportunity to issue the correct session.

The trouble with that is that when we check for barelf's we are in the 
DATA part of the transaction and we'd rather just get the connection 
closed than wait for the full content and then reject it.


  - ask

-- 
http://www.askbjoernhansen.com/

0
ask
12/19/2003 10:31:03 PM
Ask Bj=F8rn Hansen <ask@develooper.com> wrote:
> On Dec 19, 2003, at 2:08 PM, Robert James Kaes wrote:

> > Another idea is to issue the 451 response code, but instead of
> > terminating the connection, simply reset the transaction. 
> > This would allow the connection to be maintained and give the
> > client a second opportunity to issue the correct session.
> 
> The trouble with that is that when we check for barelf's we are
> in the DATA part of the transaction and we'd rather just get the
> connection closed than wait for the full content and then reject
> it.

Definitely.  Robert's suggestion would make sense only if 
there's a client out there that in response to the 451 will 
correct its invalid DATA termination during the same 
connection.  If such an amazingly intelligent client existed, 
why would it send the invalid stuff in the first place?

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC

0
kcivey
12/19/2003 11:37:24 PM
Reply:

Similar Artilces:

Connection.close() not closing my connection?
My servlet calls con.close() within the finally {} of a try..catch block. Yet I notice that sa_conn_info still lists the connection. Shouldn't the connection disappear from the sa_conn_info list when I close it? And if the answer to that is "yes, it should", has anybody seen situations like mine where it *doesn't* close it? Thanks for your help, Kathleen My bad... through a series of really stupid coding mistakes, I managed to cause a SQLException to be thrown from within the finally {} block before the connection could be closed... and I was ignoring the ...

underlying connection was closed: The connection was closed unexpectedly
Hi ,   I am working with wcf and linq  and i am facing a problem"The underlying connection was closed: The connection was closed unexpectedly. " when i am trying to return my linq query to the client.I tried for changing the code in web.config for client and server.like   Client :   <behaviors> <endpointBehaviors> <behavior name="debuggingBehaviour"> <dataContractSerializer maxItemsInObjectGraph="2147483646" />                 &nb...

difference between connection.close and command.connection.close
hello, What is the difference between odbcconnection.close and odbccommand.connection.close? I am making connection once in my application in global.asax and opening connection at application_start event and closing it at application_end event. I am accessing connection through "global.myconnection" in webforms. NOw in the webforms,do I have to mycommand.connection.open before comand.executereader?? Does mycommand.connection.close , closes the odbcconnection that I make in gloabl.asax? It is confusing, because on the first function executing on webform, when I myc...

Why would a response window not close during heavy (network or CPU) usage, even when close(windowname) is coded or clicking the 'X' on the controlmenu?
Why would a response window not close during heavy (network or CPU) usage, even when close(windowname) is coded or clicking the 'X' on the controlmenu? The application that this is occuring on is accessing an oracle db over a network. A supervisor has a response window that is used to approve employee requests. During heavy network usage or heavy cpu usage (like printing a report) after the response window opens it will not close. The window has a 'close' button on it with the close(windowname) coded in it. However, the close command will not work, neither will c...

SFtp connect
The following Ftp connect to a sftp site has the right port/usrname/password [verified thru filezilla], but when I try to connect via TIDFTP -- I get "Connection Closed Gracefully" upon ftp->Connect();; The ftp properties are below the code. I have no other Indy objects on the form. It ocurred to me that I may need something for sftp. ftp->Connect(); if (ftp->Connected()) { ::Sleep(1); } object ftp: TIdFTP AutoLogin = True Host = 'ftp.dailyaccess.com' Password ='XXXXX' Port = 21 Username = 'charles.leggette' ProxySet...

Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 172.18.9.41 (172.18.9.41:25), connect error 10061
hi. i'm trying to send Emails on a project developed with ASP.NET 2.0 and C#, using SMTP,and here's the message i get, Service not available, closing transmission channel. The server response was: Cannot connect to SMTP server 172.18.9.41 (172.18.9.41:25), connect error 10061 any help will be appreciated. Seems you dont have STMP configured for your box or the box located at that IP. Eric RamseurRainbow Portal 2.0 AdminDownload Rainbow 2.0!!Rainbow Code Rainbow Portal CommunityC# 2005 Group...

superreview requested: [Bug 248827] Support HTTP/1.1 408 response code [was: 408 request timeout on a used, persistent, keep-alive connection is mistakenly used as the response on a subsequent request
Darin Fisher <darin@meer.net> has asked Boris Zbarsky <bzbarsky@mit.edu> for superreview: Bug 248827: Support HTTP/1.1 408 response code [was: 408 request timeout on a used, persistent, keep-alive connection is mistakenly used as the response on a subsequent request] https://bugzilla.mozilla.org/show_bug.cgi?id=248827 Attachment 182294: v2 patch https://bugzilla.mozilla.org/attachment.cgi?id=182294&action=edit ...

superreview granted: [Bug 248827] Support HTTP/1.1 408 response code [was: 408 request timeout on a used, persistent, keep-alive connection is mistakenly used as the response on a subsequent request]
Boris Zbarsky <bzbarsky@mit.edu> has granted Darin Fisher <darin@meer.net>'s request for superreview: Bug 248827: Support HTTP/1.1 408 response code [was: 408 request timeout on a used, persistent, keep-alive connection is mistakenly used as the response on a subsequent request] https://bugzilla.mozilla.org/show_bug.cgi?id=248827 Attachment 182294: v2 patch https://bugzilla.mozilla.org/attachment.cgi?id=182294&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> >Index: nsHttpConnection.cpp >+ // trigger the transactions...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
  Hi I am using WebService in asp.net during webservices call an error occur some time. Which through the message like   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept aliv...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Hi,  If anyone knows..... why would the above mentioned error occur?   It happens at this line of my code : iBranchHierarchyLevel = objdbAccess.org_GetBranchHierarchyLevel(iUserBranchID)   I am using a web reference - which is connected to objdbaccess and org_GetBranchHierarchyLevel is a method   tnx :) Follow this thread please http://forums.asp.net/t/1127234.aspx  Hosam Kamel Remember to click on Mark as answer on the post that helped you...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
Hello everyone, Please I truly need your help. I just changed my code from asp.net 1.1 to 2.0, and my page calls both the database and webservice for data. In asp.net 1.1, my code works perfectly, but in 2.0, I keep getting this error "Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." I spent weeks online and I got this code, Public Class MyTestServiceInherits VHMS.SOAPService Protected Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequestDim we...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
Hi I am using WebService in asp.net during WebServices call an error occur some time. Which through the message like   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was ...

superreview granted: [Bug 338243] Enabling TLS for new IMAP connections doesn't close old connections : [Attachment 237619] close cached connections when socket type changes
Scott MacGregor <mscott@mozilla.org> has granted David Bienvenu <bienvenu@nventure.com>'s request for superreview: Bug 338243: Enabling TLS for new IMAP connections doesn't close old connections https://bugzilla.mozilla.org/show_bug.cgi?id=338243 Attachment 237619: close cached connections when socket type changes https://bugzilla.mozilla.org/attachment.cgi?id=237619&action=edit ...

superreview requested: [Bug 338243] Enabling TLS for new IMAP connections doesn't close old connections : [Attachment 237619] close cached connections when socket type changes
David Bienvenu <bienvenu@nventure.com> has asked Scott MacGregor <mscott@mozilla.org> for superreview: Bug 338243: Enabling TLS for new IMAP connections doesn't close old connections https://bugzilla.mozilla.org/show_bug.cgi?id=338243 Attachment 237619: close cached connections when socket type changes https://bugzilla.mozilla.org/attachment.cgi?id=237619&action=edit ...

Web resources about - Response Code for Closing Connection - perl.qpsmtpd

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Paris attacks: Belgium connection probed as terrorist past of Brussels district of Molenbeek under spotlight ...
Prosecutors reveal a growing Belgian connection to the deadly Paris attacks, focusing on a poor Brussels district.

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Brussels Connection Under Spotlight After Paris Killings
(EurActiv) — Prosecutors on Sunday disclosed a growing Belgian connection to the Paris attacks as Premier Charles Michel conceded that a Brussels ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Get ready for live-streamed extreme sports: Seattle startup Sioeye adds 4G connection to action cam
The history of people doing crazy stunts on camera is full of notable achievements. Motorcycle daredevil Evel Knievel jumped over whatever he ...

Resources last updated: 11/26/2015 5:14:50 AM