dtmail and Content-Length header

dtmail and Content-Length header

Post by Martin Pau » Fri, 28 Mar 2003 00:07:05



Does anybody know if there are (still) issues with dtmail
and missing Content-Length headers in modern Solaris versions ?

I would like to switch to procmail as LDA, using sendmail's
FEATURE(`local_procmail'). The standard LDA in Solaris (mail.local)
does generate a Content-Length header, while procmail doesn't.
Some testing showed that dtmail worked without Content-Length.
Googling around showed that at least early versions of dtmail
required the Content-Length header in all messages.

But when I switched to procmail, an hour later a user complained
that he couldn't see new messages in dtmail anymore. He looked
at the inbox with pine, and could see the messages there.
Unfortunately he removed some of the messages, so I couldn't
check if the reason was some otherwise badly formatted message.

Before trying to switch to procmail again, I'd like to make
sure it really doesn't do any harm.

mp.
--
                         Martin Paul | Systems Administrator

       University of Vienna, Austria | http://www.par.univie.ac.at/

 
 
 

dtmail and Content-Length header

Post by Thomas Schu » Fri, 28 Mar 2003 01:13:15




Quote:>Does anybody know if there are (still) issues with dtmail
>and missing Content-Length headers in modern Solaris versions ?

>I would like to switch to procmail as LDA, using sendmail's
>FEATURE(`local_procmail'). The standard LDA in Solaris (mail.local)
>does generate a Content-Length header, while procmail doesn't.
>Some testing showed that dtmail worked without Content-Length.
>Googling around showed that at least early versions of dtmail
>required the Content-Length header in all messages.

>But when I switched to procmail, an hour later a user complained
>that he couldn't see new messages in dtmail anymore. He looked
>at the inbox with pine, and could see the messages there.
>Unfortunately he removed some of the messages, so I couldn't
>check if the reason was some otherwise badly formatted message.

>Before trying to switch to procmail again, I'd like to make
>sure it really doesn't do any harm.

We have been using procmail for about 3 years now.  When we started
using it, the dtmail that we had then did require the Content-Length
header and I found a way to get it included.  What we did was to
modify the Sendmail configuration to include a Content-Length
header with a fake length of 0000000000 and then call procmail
without the -Y flag so that procmail will correct the value of the
Content-Length header. Recent experiments seem to show that all this
is no longer necessary, but I have not yet ripped this stuff out.

That said, we have recently started having problems with dtmail.
Starting on March 10 (within a day or so), I have had user complaints
about dtmail not showing new messages.  The users stop and restart
dtmail and then it works anywhere from a few hours to a few days.
They then have the problem again and have to restart dtmail again.
It is intresting to note that the Sendmail security notice was sent
out on March 3, I upgraded Sendmail on March 5, and we started
logging 'Dropped invalid comments from header address' alerts on
March 7.  I wonder if there is a connection.

>mp.
>--
>                         Martin Paul | Systems Administrator

>       University of Vienna, Austria | http://www.par.univie.ac.at/

--
Tom Schulz


 
 
 

dtmail and Content-Length header

Post by Martin Pau » Fri, 28 Mar 2003 19:03:15



> We have been using procmail for about 3 years now.  When we started
> using it, the dtmail that we had then did require the Content-Length
> header and I found a way to get it included.  What we did was to
> modify the Sendmail configuration to include a Content-Length
> header with a fake length of 0000000000 and then call procmail
> without the -Y flag so that procmail will correct the value of the
> Content-Length header. Recent experiments seem to show that all this
> is no longer necessary, but I have not yet ripped this stuff out.

I had read about that hack, too, but wanted to avoid it. I did some
more testing and reading, and I'm now pretty sure that dtmail uses
Content-Length if it exists, but it can look for "From " lines
itself, too. It's probably like described in the man page for "mp":

    Instead of using "\nFrom" to denote the start  of  new
    mail messages, mp will look for (and use) the value of
    the Content-Length: mail header. If the Content-Length
    doesn't  take  you  to  the  next "\nFrom", then it is
    wrong, and mp falls  back  to  looking  for  the  next
    "\nFrom" in the mail folder.

I tried modifiying the number in an existing Content-Lenght header,
to see how the mail readers deal with it. "mail" and "mailx" use the
(wrong) number, but get the next "From " correctly. "dtmail" seems
to ignore the wrong number, it shows all messages correctly.

BugID 4288837 suggests that dtmail does not rely on Content-Lenght
alone, too.

It would still be nice to get a definitive description of the
behaviour (maybe someone with the source of dtmail can tell us ?).

BTW, am I right in assuming that Content-Length was Sun's solution
for the problem with "\nFrom " lines in the mail body, and has
no other use ? Nowadays at least sendmail and procmail can do
the standard (?) way of escaping them with ">". Wouldn't it be a good
idea for Sun to get rid of Content-Lenght completely, and let
sendmail or mail.local fix it ?

Quote:> That said, we have recently started having problems with dtmail.
> Starting on March 10 (within a day or so), I have had user complaints
> about dtmail not showing new messages.  The users stop and restart
> dtmail and then it works anywhere from a few hours to a few days.
> They then have the problem again and have to restart dtmail again.
> It is intresting to note that the Sendmail security notice was sent
> out on March 3, I upgraded Sendmail on March 5, and we started
> logging 'Dropped invalid comments from header address' alerts on
> March 7.  I wonder if there is a connection.

Interesting. I switched to 8.12.8 at about the same time, and this
was the first time ever a user reported such a problem (AFAIR).
In my case even closing dtmail, logging out didn't make the messages
appear, though.

mp.
--
                         Martin Paul | Systems Administrator

       University of Vienna, Austria | http://www.par.univie.ac.at/

 
 
 

dtmail and Content-Length header

Post by Neil W Ricker » Fri, 28 Mar 2003 23:05:10



>BTW, am I right in assuming that Content-Length was Sun's solution
>for the problem with "\nFrom " lines in the mail body, and has
>no other use ? Nowadays at least sendmail and procmail can do

It might be more accurate to say that it is the SYSV way of dealing
with that problem.

Quote:>the standard (?) way of escaping them with ">". Wouldn't it be a good
>idea for Sun to get rid of Content-Lenght completely, and let
>sendmail or mail.local fix it ?

Probably.  But you have to persuade Sun.
 
 
 

dtmail and Content-Length header

Post by Thomas Schu » Sat, 29 Mar 2003 04:41:25





>> We have been using procmail for about 3 years now.  When we started
>> using it, the dtmail that we had then did require the Content-Length
>> header and I found a way to get it included.  What we did was to
>> modify the Sendmail configuration to include a Content-Length
>> header with a fake length of 0000000000 and then call procmail
>> without the -Y flag so that procmail will correct the value of the
>> Content-Length header. Recent experiments seem to show that all this
>> is no longer necessary, but I have not yet ripped this stuff out.

>I had read about that hack, too, but wanted to avoid it. I did some
>more testing and reading, and I'm now pretty sure that dtmail uses
>Content-Length if it exists, but it can look for "From " lines
>itself, too. It's probably like described in the man page for "mp":

>    Instead of using "\nFrom" to denote the start  of  new
>    mail messages, mp will look for (and use) the value of
>    the Content-Length: mail header. If the Content-Length
>    doesn't  take  you  to  the  next "\nFrom", then it is
>    wrong, and mp falls  back  to  looking  for  the  next
>    "\nFrom" in the mail folder.

>I tried modifiying the number in an existing Content-Lenght header,
>to see how the mail readers deal with it. "mail" and "mailx" use the
>(wrong) number, but get the next "From " correctly. "dtmail" seems
>to ignore the wrong number, it shows all messages correctly.

>BugID 4288837 suggests that dtmail does not rely on Content-Lenght
>alone, too.

>It would still be nice to get a definitive description of the
>behaviour (maybe someone with the source of dtmail can tell us ?).

>BTW, am I right in assuming that Content-Length was Sun's solution
>for the problem with "\nFrom " lines in the mail body, and has
>no other use ? Nowadays at least sendmail and procmail can do
>the standard (?) way of escaping them with ">". Wouldn't it be a good
>idea for Sun to get rid of Content-Lenght completely, and let
>sendmail or mail.local fix it ?

There have been discussions about this over in comp.mail.sendmail.
I started one of them with the subject 'Any mailer flags reserved for
site specific use?'  It was about my hack to get procmail to add
the Content-Length header.  Google still has it in it's archive.
Go to http://groups.google.com and then to comp.mail.sendmail
and then search for 'Any mailer flags reserved for site specific use`
A lot of people think that this header is a really bad idea.

In any case, it might be a good idea to call procmail without the -Y flag
so that it will repair any Content-Length headers that might be added
by something other than your mailer.  You also might add the +E
mailer flag so that any 'From' lines are quoted by sendmail.  What
I have in my mc file is:

LOCAL_RULESETS`'dnl
# `Add null Content-Length header for procmail'
H?E?Content-Length: 0000000000
FEATURE(local_procmail)dnl
MODIFY_MAILER_FLAGS(`LOCAL', `+E')dnl # For use with procmail
define(`LOCAL_MAILER_ARGS', `procmail -a $h -d $u')dnl # Remove -Y

- Show quoted text -

>> That said, we have recently started having problems with dtmail.
>> Starting on March 10 (within a day or so), I have had user complaints
>> about dtmail not showing new messages.  The users stop and restart
>> dtmail and then it works anywhere from a few hours to a few days.
>> They then have the problem again and have to restart dtmail again.
>> It is intresting to note that the Sendmail security notice was sent
>> out on March 3, I upgraded Sendmail on March 5, and we started
>> logging 'Dropped invalid comments from header address' alerts on
>> March 7.  I wonder if there is a connection.

>Interesting. I switched to 8.12.8 at about the same time, and this
>was the first time ever a user reported such a problem (AFAIR).
>In my case even closing dtmail, logging out didn't make the messages
>appear, though.

>mp.
>--
>                         Martin Paul | Systems Administrator

>       University of Vienna, Austria | http://www.par.univie.ac.at/

--
Tom Schulz

 
 
 

1. content-length not returned in some headers

hello,

I was looking at the headers some Apache servers return and noticed that the
server doesn't always return the content-length :(
I tried looking for a pattern, but it looks like it's random.  Apache sends
the length for some HTML files, and then doesn't for other ones....

for an example, try looking at the headers returned by something like
        http://www.dominis.com/Zines/ByCategory/

Does anyone know why that is ?  Also, this may not be only the Apache
problem....

Thanks !

Otis
--
eZines Database          -      <URL:http://www.dominis.com/Zines/>
eBooks Dominis Bookstore -      <URL:http://www.booksite.com/cgi-bin/zines>

2. FTP message Question

3. MH vs. Content-Length: header

4. pppd syslog message - What's it mean?

5. mailx and Content-Length: headers

6. Recovering data from Linux partition?

7. Content-Length http header?

8. serial links...

9. Help: (mail) content-length/type headers not set

10. Content-Length Header in Apache 1.3b3

11. Filters for Apache2 - removing Content-length

12. how to calculate Content-length ?

13. Apache/POST/Content-length