Any mailer flags reserved for site specific use?

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Sat, 07 Dec 2002 12:27:06



Are there any mailer flags reserved for site specific use?  I want to
define a header to be added when certain mailers are used and none of
the defined mailer flags are quite the right ones to use.

What I am trying to do:
I am using procmail as the local deliverey agent and I want my users to
be able to use ANY mail reading program they want.  This requires that
there be a Content-Length header (as well as quoting lines starting
with From).  Procmail can adjust the value of a Content-Length header
but requires that there be an existing header to adjust.  Well that is
easy, just add
H?l?Content-Length: 0000000000
to the mc file and everything works.  BUT, now there is a Content-Length:
header supplied to the program mailer (with a size of 0000000000) as well
as to the local mailer.  I would rather not have that.
Now, if I understand how sendmail works, I could just define the header
with an unused mailer flag and then add that flag to the procmail mailer
and then only that mailer would get the header.  But if I were to  pick
one that is currently unused, I am sure that the next release of Sendmail
would use it for something new

Are there any mailer flags reserved for site specific use?
Is my understanding of how sendmail uses mailer flags to pull in
defined headers correct?
Should I be doing this in a different way?
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Neil W Ricker » Sat, 07 Dec 2002 14:37:10



>Are there any mailer flags reserved for site specific use?  I want to
>define a header to be added when certain mailers are used and none of
>the defined mailer flags are quite the right ones to use.

Pick an unused letter, preferably an upper case letter.

There is no guarantee this won't be used in the future.  However,
the sendmail team appears to be trying to avoid letters, and to
instead use other ascii characters for new flags.  Presumably this
is to keep a few letters available for the kind of use you
are considering.

 
 
 

Any mailer flags reserved for site specific use?

Post by Claus A?man » Sat, 07 Dec 2002 15:20:23




> >Are there any mailer flags reserved for site specific use?  I want to
> >define a header to be added when certain mailers are used and none of
> >the defined mailer flags are quite the right ones to use.
> Pick an unused letter, preferably an upper case letter.
> There is no guarantee this won't be used in the future.  However,
> the sendmail team appears to be trying to avoid letters, and to

Sorry, no...

#if _FFR_STRIPBACKSL
# define M_STRIPBACKSL  'B'     /* strip leading backslash from user */
#endif /* _FFR_STRIPBACKSL */

that's from the CVS repository...

Quote:> instead use other ascii characters for new flags.  Presumably this
> is to keep a few letters available for the kind of use you
> are considering.

 
 
 

Any mailer flags reserved for site specific use?

Post by Per Hedela » Sun, 08 Dec 2002 07:44:32




>What I am trying to do:
>I am using procmail as the local deliverey agent and I want my users to
>be able to use ANY mail reading program they want.  This requires that
>there be a Content-Length header (as well as quoting lines starting
>with From).

Are you sure about this? I'd say that a mail reading program that can't
deal with mbox format without Content-Length is just plain broken. The
reason for this is that among the many stupidities commited by the
"inventors" of that wretched header is that they *didn't* define a
special mailbox format - there is *no* way to determine if a given
mbox-format file is *using* Content-Length or not. (Even if all the
messages in the file happen to have such a header, it could have been
created by some other systems and just ignored by the one writing the
mbox - which of course also implies that it can be wildly off.)

The bottom line is that any Content-Length-using mail reader has to be
prepared to deal with all variations - no Content-Length headers at all,
Content-Length on some messages but not on others, Content-Length
present but wrong, etc. And yes, this means that the header is totally
useless for its intended purpose, and the only actual effects it has are
harmful.

--Per Hedeland

 
 
 

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Mon, 09 Dec 2002 12:50:48





>>What I am trying to do:
>>I am using procmail as the local deliverey agent and I want my users to
>>be able to use ANY mail reading program they want.  This requires that
>>there be a Content-Length header (as well as quoting lines starting
>>with From).

>Are you sure about this? I'd say that a mail reading program that can't
>deal with mbox format without Content-Length is just plain broken. The
>reason for this is that among the many stupidities commited by the
>"inventors" of that wretched header is that they *didn't* define a
>special mailbox format - there is *no* way to determine if a given
>mbox-format file is *using* Content-Length or not. (Even if all the
>messages in the file happen to have such a header, it could have been
>created by some other systems and just ignored by the one writing the
>mbox - which of course also implies that it can be wildly off.)

>The bottom line is that any Content-Length-using mail reader has to be
>prepared to deal with all variations - no Content-Length headers at all,
>Content-Length on some messages but not on others, Content-Length
>present but wrong, etc. And yes, this means that the header is totally
>useless for its intended purpose, and the only actual effects it has are
>harmful.

>--Per Hedeland


Well, the mail user agents that are supplied by Sun with their Solairs
operating environment do seem to require the Content-Length header.
But then on a stock Solaris system, the Sun mail dilevery agent
(usr/lib/mail.local) adds this header and sees to it that it is correct.
Apparently the writers of the Sun mail readers expect the mailboxes to
be written by their dilevery agent and see no reason to provide for any
other possibility.
Procmail will also correct the value of the Content-Length header, but will
not add it if it is missing.  Adding a Content-Length header with a value
of 0 in Sendmail fixes this problem. (Actually a value of 0000000 as
Procmail requires that the header be long enough to hold the final value).
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Per Hedela » Mon, 09 Dec 2002 19:28:58





>>The bottom line is that any Content-Length-using mail reader has to be
>>prepared to deal with all variations - no Content-Length headers at all,
>>Content-Length on some messages but not on others, Content-Length
>>present but wrong, etc. And yes, this means that the header is totally
>>useless for its intended purpose, and the only actual effects it has are
>>harmful.
>Well, the mail user agents that are supplied by Sun with their Solairs
>operating environment do seem to require the Content-Length header.

Of those (two?), I've only used 'mailx' - but that I did for several
years, on a system without Content-Length headers in the mailboxes
(straight sendmail + procmail), and it had no problems at all. I seem to
remember that it would complain if it found some mixture of messages
with and without Content-Length, but I don't think it actually had any
problems with that either. I'm pretty sure there were some users of
their GUI-based MUA on that system too - though of course this is
relevant only if it accesses the actual mail spool file via NFS (your
description implies that this is a multi-user system), which is
generally frowned upon.

--Per Hedeland

 
 
 

Any mailer flags reserved for site specific use?

Post by Neil W Ricker » Mon, 09 Dec 2002 23:59:37



>Well, the mail user agents that are supplied by Sun with their Solairs
>operating environment do seem to require the Content-Length header.

I doubt that.

Solaris does come with "/usr/bin/mailcompat" for the benefit of
people who don't want a "Content-Length:" header.

I recompiled "mail.local" to not add a "Content-Length:", and have
been using it that way for almost 2 years on solaris.  The only side
effect I have noticed is that it is now very rare for users to ask
me to fix their broken mailboxes.

 
 
 

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Thu, 12 Dec 2002 00:38:50






>>>The bottom line is that any Content-Length-using mail reader has to be
>>>prepared to deal with all variations - no Content-Length headers at all,
>>>Content-Length on some messages but not on others, Content-Length
>>>present but wrong, etc. And yes, this means that the header is totally
>>>useless for its intended purpose, and the only actual effects it has are
>>>harmful.

>>Well, the mail user agents that are supplied by Sun with their Solairs
>>operating environment do seem to require the Content-Length header.

>Of those (two?), I've only used 'mailx' - but that I did for several
>years, on a system without Content-Length headers in the mailboxes
>(straight sendmail + procmail), and it had no problems at all. I seem to
>remember that it would complain if it found some mixture of messages
>with and without Content-Length, but I don't think it actually had any
>problems with that either. I'm pretty sure there were some users of
>their GUI-based MUA on that system too - though of course this is
>relevant only if it accesses the actual mail spool file via NFS (your
>description implies that this is a multi-user system), which is
>generally frowned upon.

>--Per Hedeland


There are three: mailx, mailtool (openwindows) & dtmail (Common Desktop).
Either my memory is faulty or Sun has changed things.  What I remember is
that when I switched to Procmail several years back, I got either errors
or strong complaints from at least one of these user agents.  That is when
I configured Sendmail to add the Content-Length header with a value of
0000000000 and configured Procmail to adjust the value to the correct
value.
I have just tried all three user agents on both Solaris 2.5.1 & Solaris 8
with a mail spool that had no Content-Length header and one where some of
the messages had it and others did not, and I got no errors or complaints
with any combination.
I don't see how the Content-Length header could be harmfull if the program
that writes the mail spool makes sure that the value is correct, but as I
am also quoting lines starting with From, I do agree that it is useless.
If all user agents could use it it would be usefull, but there are many
that do not.
We are accessesing the actual mail spool file via NFS for some users, but
Sun says that if you mount the mail spool with actimeo=0 it will work.
So far we have had no problems.  We have been doing this for over 10 years
now.
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Thu, 12 Dec 2002 00:48:07






>>>The bottom line is that any Content-Length-using mail reader has to be
>>>prepared to deal with all variations - no Content-Length headers at all,
>>>Content-Length on some messages but not on others, Content-Length
>>>present but wrong, etc. And yes, this means that the header is totally
>>>useless for its intended purpose, and the only actual effects it has are
>>>harmful.

>>Well, the mail user agents that are supplied by Sun with their Solairs
>>operating environment do seem to require the Content-Length header.

>Of those (two?), I've only used 'mailx' - but that I did for several
>years, on a system without Content-Length headers in the mailboxes
>(straight sendmail + procmail), and it had no problems at all. I seem to
>remember that it would complain if it found some mixture of messages
>with and without Content-Length, but I don't think it actually had any
>problems with that either. I'm pretty sure there were some users of
>their GUI-based MUA on that system too - though of course this is
>relevant only if it accesses the actual mail spool file via NFS (your
>description implies that this is a multi-user system), which is
>generally frowned upon.

>--Per Hedeland


There are three: mailx, mailtool (openwindows) & dtmail (Common Desktop).
Either my memory is faulty or Sun has changed things.  What I remember is
that when I switched to Procmail several years back, I got either errors
or strong complaints from at least one of these user agents.  That is when
I configured Sendmail to add the Content-Length header with a value of
0000000000 and configured Procmail to adjust the value to the correct
value.
I have just tried all three user agents on both Solaris 2.5.1 & Solaris 8
with a mail spool that had no Content-Length header and one where some of
the messages had it and others did not, and I got no errors or complaints
with any combination.
I don't see how the Content-Length header could be harmfull if the program
that writes the mail spool makes sure that the value is correct, but as I
am also quoting lines starting with From, I do agree that it is useless.
If all user agents could use it it would be usefull, but there are many
that do not.
We are accessesing the actual mail spool file via NFS for some users, but
Sun says that if you mount the mail spool with actimeo=0 it will work.
So far we have had no problems.  We have been doing this for over 10 years
now.  A few years back all of our users accessed the spool file via NFS,
but now most of them are accessing it via our pop server which runs on the
machine that runs Sendmail and has the mail spool disk.
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Thu, 12 Dec 2002 01:06:49





>>Well, the mail user agents that are supplied by Sun with their Solairs
>>operating environment do seem to require the Content-Length header.

>I doubt that.

As you may have already read in my reply to another branch of this thread,
the current Sun mail user agents are quite happy without the Content-Length
header.  Unless my memory is completely messed up, they used to complain.

Quote:

>Solaris does come with "/usr/bin/mailcompat" for the benefit of
>people who don't want a "Content-Length:" header.

>I recompiled "mail.local" to not add a "Content-Length:", and have
>been using it that way for almost 2 years on solaris.  The only side
>effect I have noticed is that it is now very rare for users to ask
>me to fix their broken mailboxes.

I have not had any need to fix users broken mailboxes.  The only time I
had problems with corrupted mailboxes was back when we were running
SunOS 4.1.3 and I fired up qpopper.  Qpopper, at least the version available
several years back, did not bother to lock the mailbox if it was running
under SunOS 4.*.  It would have locked the mailbox had we been running
Solaris, but we had not yet made that switch.  I replaced qpopper with
cucipop and I have not had a corrupted mailbox since.
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Thomas Schu » Thu, 12 Dec 2002 01:15:13






>> >Are there any mailer flags reserved for site specific use?  I want to
>> >define a header to be added when certain mailers are used and none of
>> >the defined mailer flags are quite the right ones to use.

>> Pick an unused letter, preferably an upper case letter.

>> There is no guarantee this won't be used in the future.  However,
>> the sendmail team appears to be trying to avoid letters, and to

>Sorry, no...

>#if _FFR_STRIPBACKSL
># define M_STRIPBACKSL      'B'     /* strip leading backslash from user */
>#endif /* _FFR_STRIPBACKSL */

>that's from the CVS repository...

>> instead use other ascii characters for new flags.  Presumably this
>> is to keep a few letters available for the kind of use you
>> are considering.

Looking at the unused letters, I see that there are three where both the
lower case and upper case are unused (t,T,v,V,y,Y).  Using the upper case
of any of these would probably be the safest thing to do.  If you are
following the other branches of this thread, you will see that I probably
do not need to do this at all.  Still, it might be a good idea to have
a flag or two reserved for site specific use.
--
Tom Schulz

 
 
 

Any mailer flags reserved for site specific use?

Post by Per Hedela » Thu, 12 Dec 2002 07:48:43




>I don't see how the Content-Length header could be harmfull if the program
>that writes the mail spool makes sure that the value is correct, but as I
>am also quoting lines starting with From, I do agree that it is useless.
>If all user agents could use it it would be usefull, but there are many
>that do not.

The very fact that it isn't even theoretically possible to have the huge
set of programs that read and write mbox-format files (and existence of
such files is by no means restricted to the mail spool) change their
interpretation of that format from one day to another is the primary
reason Content-Length is harmful, but there are others. You don't have
to take my word for it though, see e.g.
http://www.jwz.org/doc/content-length.html - Mark Crispin (author of
Pine) has also supposedly written a document that is actually called
"Content-Length Considered Harmful", I couldn't find it in a quick
search though.

If Content-Length had been part of the specification of a *new* mailbox
format, easily distinguishable from the traditional mbox format, it
might have been less harmful and actually somewhat useful - but it
wasn't.

--Per Hedeland

 
 
 

1. Using the `w' mailer flag without .forward files?

My mail server runs sendmail-8.12.3 with the local mailer doing
LMTP delivery to a Cyrus IMAP server.  All user accounts are in
the NIS passwd map, and all have Cyrus mailboxes.  Mail forwarding
is done by Cyrus sieve scripts, so there are no home directories
or .forward files mounted on the mail server.

Consequently, I've omitted the `w' mailer flag from the local mailer
definition.  However, I notice that the SMTP `expn' command indicates
that any arbitrary user name is a known user.  Sendmail delivers
mail for unknown local users to Cyrus, where it's rejected like this:

     ----- Transcript of session follows -----
  ... while talking to localhost:
  >>> DATA
  <<< 550 5.1.1 User unknown

  <<< 503 5.5.1 No recipients

Should I add the `w' flag to the local mailer?  Will this break
anything?  Is there a way to disable the search for .forward files
when the `w' flag is present?

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

2. Help with msn email address

3. Multiple recipients using F=m mailer flag and local.mail

4. Any Freeware compiler for OpenVMS Alpha?

5. SUMMARY: Howto reserve connections for local mailers on busy mail spool

6. Sharing SCSI bus???

7. Mailer flag "9" OK with esmtp mailer?

8. Anyone using SOSS?

9. specific mailer for specific domain

10. Problem using Sendmail "prog" mailer - unknown mailer error 1

11. .forward files without "w" flag in mailer?

12. which mailer flag trims 8 bit mails

13. local mailer flags