Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

qmail broken headers

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


qmail at top-consulting

Feb 24, 2011, 2:53 PM

Post #1 of 3 (653 views)
Permalink
qmail broken headers

I am having a world of trouble with messages that contain a References
header whenever that References line goes above 1000 characters.

As per the RFC any one line can't have more than 1000 characters which
is totally fine. The problem however is that messages from a certain
person are coming up broken. Looking at the source of the messages I
see that the References line has been broken at the 1000 character
mark and an empty new line has been inserted. All e-mail clients
interpret that as being the end of the headers.

I have recorded the SMTP conversation as I receive this particular
message and here's what happens at the 1000 character mark:

@400000004d66d1113841ec94 11008 < 97B-8278-3415983066^M
@400000004d66d1113841f464 11008 < ^M
@400000004d66d1113841fc34 11008 < 13@

Is that cutoff done by qmail itself or am I receiving that from the
remote end ?

When the same person e-mails my Hotmail account for example, the
message arrives broken at the same spot but there's no new line
inserted like with Qmail.

What's going on ?


ma1l1ists at yahoo

Feb 24, 2011, 3:50 PM

Post #2 of 3 (619 views)
Permalink
Re: qmail broken headers [In reply to]

On Thu, 24 Feb 2011 17:53:49 -0500
qmail [at] top-consulting wrote:

> I am having a world of trouble with messages that contain a References
> header whenever that References line goes above 1000 characters.
>
> As per the RFC any one line can't have more than 1000 characters which
> is totally fine. The problem however is that messages from a certain
> person are coming up broken. Looking at the source of the messages I
> see that the References line has been broken at the 1000 character
> mark and an empty new line has been inserted. All e-mail clients
> interpret that as being the end of the headers.
>
> I have recorded the SMTP conversation as I receive this particular
> message and here's what happens at the 1000 character mark:
>
> @400000004d66d1113841ec94 11008 < 97B-8278-3415983066^M
> @400000004d66d1113841f464 11008 < ^M
> @400000004d66d1113841fc34 11008 < 13@
>
> Is that cutoff done by qmail itself or am I receiving that from the
> remote end ?
>
> When the same person e-mails my Hotmail account for example, the
> message arrives broken at the same spot but there's no new line
> inserted like with Qmail.
>
> What's going on ?
>
>

The following mails were fired across not long ago. Are you using a
cisco or any proxy filter by any chance?



_______________________________________________________________________
From: Hugo Monteiro <hugo.monteiro [at] fct>
To: qmail [at] list
Subject: Re: Dropped connections with header lines longer than 998
characters Date: Wed, 05 Jan 2011 19:54:55 +0000
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; PT-pt; rv:1.9.1.9pre)
Gecko/20100217 Lightning/1.0b1 Shredder/3.0.3pre

On 01/05/2011 06:52 PM, Charles Cazabon wrote:
> Brent Gardner<brent.gardner [at] gmail> wrote:
>
>> I'm seeing an issue where qmail appears to be dropping connections from
>> remote senders that try to send us messages with header lines that are
>> longer than 998 characters.
>>
>> I'm running qmail as part of qmailtoaster, qmail is patched to
>> netqmail-1.05.
>>
> Do you have any other patches or addons installed? My qmail does not do as
> you say.
>
>
>> This setup serves as a spam filter for our corporate Exchange server.
>>
> What are you using to scan messages for spam or viruses/trojans during the SMTP
> conversation? It looks like that program is probably at fault here.
>
> Charles
>

RFCs, from initial 821 through 5321 state:

" The maximum total length of a text line including the <CRLF> is 1000
octets"

RFC5321 also states that

" This number may be increased by the use of SMTP Service Extensions."

So, if your qmail install doesn't support and advertise ESMTP line
value, the client, or connecting server, has no business in trying to
send lines longer than that. That limit was also set to avoid possible
buffer overflows in less robust implementations.

Regards,

Hugo Monteiro.


______________________________________________________________________
From: Brent Gardner <brent.gardner [at] gmail>
To: qmail [at] list
Subject: Re: Dropped connections with header lines longer than 998
characters Date: Wed, 05 Jan 2011 18:01:21 -0700
User-Agent: Thunderbird 2.0.0.21 (X11/20090320)

Charles Cazabon wrote:
> Brent Gardner <brent.gardner [at] gmail> wrote:
>
>> I'm seeing an issue where qmail appears to be dropping connections from
>> remote senders that try to send us messages with header lines that are
>> longer than 998 characters.
>>
>> I'm running qmail as part of qmailtoaster, qmail is patched to
>> netqmail-1.05.
>>
>
> Do you have any other patches or addons installed? My qmail does not do as
> you say.
>
>
The patch level is according to this page dated 2009-03-16 in the
qmailtoaster wiki:
http://wiki.qmailtoaster.com/index.php/Patches_included_with_QmailToaster.
I haven't installed any other patches myself.

>> This setup serves as a spam filter for our corporate Exchange server.
>>
>
> What are you using to scan messages for spam or viruses/trojans during the SMTP
> conversation? It looks like that program is probably at fault here.
>
>
I also run Spamdyke in front of qmail, but behavior is the same with or
without Spamdyke enabled.


I've determined the problem to be ESMTP filtering in our Cisco ASA.
Annoyingly, that's the first thing I checked when this issue was
brought to my attention. Guess I didn't check thoroughly enough.

Charles, Hugo- thanks for your replies. They led me to new research
paths which have increased my knowledge.


Brent Gardner

________________________________________________________________________________


qmail at top-consulting

Feb 24, 2011, 4:12 PM

Post #3 of 3 (629 views)
Permalink
Re: qmail broken headers [In reply to]

We do use a Barracuda Box in front. It's up to date and running properly.

Checking out the message in it clearly shows a new line between the
two References lines.

I guess the question now becomes if the Barracuda inserts that extra line.

If so, it's another bug in a loooong list...



Quoting Kevin Chadwick <ma1l1ists [at] yahoo>:

> On Thu, 24 Feb 2011 17:53:49 -0500
> qmail [at] top-consulting wrote:
>
>> I am having a world of trouble with messages that contain a References
>> header whenever that References line goes above 1000 characters.
>>
>> As per the RFC any one line can't have more than 1000 characters which
>> is totally fine. The problem however is that messages from a certain
>> person are coming up broken. Looking at the source of the messages I
>> see that the References line has been broken at the 1000 character
>> mark and an empty new line has been inserted. All e-mail clients
>> interpret that as being the end of the headers.
>>
>> I have recorded the SMTP conversation as I receive this particular
>> message and here's what happens at the 1000 character mark:
>>
>> @400000004d66d1113841ec94 11008 < 97B-8278-3415983066^M
>> @400000004d66d1113841f464 11008 < ^M
>> @400000004d66d1113841fc34 11008 < 13@
>>
>> Is that cutoff done by qmail itself or am I receiving that from the
>> remote end ?
>>
>> When the same person e-mails my Hotmail account for example, the
>> message arrives broken at the same spot but there's no new line
>> inserted like with Qmail.
>>
>> What's going on ?
>>
>>
>
> The following mails were fired across not long ago. Are you using a
> cisco or any proxy filter by any chance?
>
>
>
> _______________________________________________________________________
> From: Hugo Monteiro <hugo.monteiro [at] fct>
> To: qmail [at] list
> Subject: Re: Dropped connections with header lines longer than 998
> characters Date: Wed, 05 Jan 2011 19:54:55 +0000
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; PT-pt; rv:1.9.1.9pre)
> Gecko/20100217 Lightning/1.0b1 Shredder/3.0.3pre
>
> On 01/05/2011 06:52 PM, Charles Cazabon wrote:
>> Brent Gardner<brent.gardner [at] gmail> wrote:
>>
>>> I'm seeing an issue where qmail appears to be dropping connections from
>>> remote senders that try to send us messages with header lines that are
>>> longer than 998 characters.
>>>
>>> I'm running qmail as part of qmailtoaster, qmail is patched to
>>> netqmail-1.05.
>>>
>> Do you have any other patches or addons installed? My qmail does not do as
>> you say.
>>
>>
>>> This setup serves as a spam filter for our corporate Exchange server.
>>>
>> What are you using to scan messages for spam or viruses/trojans
>> during the SMTP
>> conversation? It looks like that program is probably at fault here.
>>
>> Charles
>>
>
> RFCs, from initial 821 through 5321 state:
>
> " The maximum total length of a text line including the <CRLF> is 1000
> octets"
>
> RFC5321 also states that
>
> " This number may be increased by the use of SMTP Service Extensions."
>
> So, if your qmail install doesn't support and advertise ESMTP line
> value, the client, or connecting server, has no business in trying to
> send lines longer than that. That limit was also set to avoid possible
> buffer overflows in less robust implementations.
>
> Regards,
>
> Hugo Monteiro.
>
>
> ______________________________________________________________________
> From: Brent Gardner <brent.gardner [at] gmail>
> To: qmail [at] list
> Subject: Re: Dropped connections with header lines longer than 998
> characters Date: Wed, 05 Jan 2011 18:01:21 -0700
> User-Agent: Thunderbird 2.0.0.21 (X11/20090320)
>
> Charles Cazabon wrote:
>> Brent Gardner <brent.gardner [at] gmail> wrote:
>>
>>> I'm seeing an issue where qmail appears to be dropping connections from
>>> remote senders that try to send us messages with header lines that are
>>> longer than 998 characters.
>>>
>>> I'm running qmail as part of qmailtoaster, qmail is patched to
>>> netqmail-1.05.
>>>
>>
>> Do you have any other patches or addons installed? My qmail does not do as
>> you say.
>>
>>
> The patch level is according to this page dated 2009-03-16 in the
> qmailtoaster wiki:
> http://wiki.qmailtoaster.com/index.php/Patches_included_with_QmailToaster.
> I haven't installed any other patches myself.
>
>>> This setup serves as a spam filter for our corporate Exchange server.
>>>
>>
>> What are you using to scan messages for spam or viruses/trojans
>> during the SMTP
>> conversation? It looks like that program is probably at fault here.
>>
>>
> I also run Spamdyke in front of qmail, but behavior is the same with or
> without Spamdyke enabled.
>
>
> I've determined the problem to be ESMTP filtering in our Cisco ASA.
> Annoyingly, that's the first thing I checked when this issue was
> brought to my attention. Guess I didn't check thoroughly enough.
>
> Charles, Hugo- thanks for your replies. They led me to new research
> paths which have increased my knowledge.
>
>
> Brent Gardner
>
> ________________________________________________________________________________
>

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.