Hi, I seem to have lost the ability to add a customised footer and header to messages. The FAQ says it was a problem in 2.0 and fixed in 2.1.
-- Colin Mackinlay
"Colin" == Colin Mackinlay <colin@mackinlay.demon.co.uk> writes:
Colin> Hi, I seem to have lost the ability to add a customised
Colin> footer and header to messages. The FAQ says it was a
Colin> problem in 2.0 and fixed in 2.1.
Read the list archives -- you're probably posting messages in iso-8859-1 or utf-8 to a list set to English (us-ascii). Mailman CVS does not add footers if the charsets of the message and footers do not match.
I posted a patch to loosen these rules, always adding footers if the list is us-ascii, but it hasn't been checked in yet.
Ben
-- Brought to you by the letters M and J and the number 19. "Killer refresh rate! It's even got a PCI bus!" Debian GNU/Linux maintainer of Gimp and Nethack -- http://www.debian.org/
In <URL:news:local.mailman-d> on Sun 10 Mar, Ben Gertzfield wrote:
"Colin" == Colin Mackinlay <colin@mackinlay.demon.co.uk> writes:
Colin> Hi, I seem to have lost the ability to add a customised Colin> footer and header to messages. The FAQ says it was a Colin> problem in 2.0 and fixed in 2.1.
Read the list archives -- you're probably posting messages in iso-8859-1 or utf-8 to a list set to English (us-ascii). Mailman CVS does not add footers if the charsets of the message and footers do not match.
That's strange then, I only use plain text and the same format has had a footer added to it by this list :-)
Thanks for the tip, I'll look into it.
-- Colin Mackinlay
"Colin" == Colin Mackinlay <colin@mackinlay.demon.co.uk> writes:
Colin> That's strange then, I only use plain text and the same
Colin> format has had a footer added to it by this list :-)
Sure. "plain text" messages can have Content-Type: headers specifying any charset, so make sure you look at those.
Ben
-- Brought to you by the letters T and L and the number 11. "A squib is a firecracker." Debian GNU/Linux maintainer of Gimp and Nethack -- http://www.debian.org/
On Sun 10 Mar, Ben Gertzfield wrote:
"Colin" == Colin Mackinlay <colin@mackinlay.demon.co.uk> writes:
Colin> That's strange then, I only use plain text and the same Colin> format has had a footer added to it by this list :-)
Sure. "plain text" messages can have Content-Type: headers specifying any charset, so make sure you look at those.
Yes and mine say US-ASCII, have a look!
-- Colin Mackinlay
At 10:59 +0000 3/10/2002, Colin Mackinlay wrote:
In <URL:news:local.mailman-d> on Sun 10 Mar, Ben Gertzfield wrote:
> "Colin" == Colin Mackinlay <colin@mackinlay.demon.co.uk> writes:
Colin> Hi, I seem to have lost the ability to add a customised Colin> footer and header to messages. The FAQ says it was a Colin> problem in 2.0 and fixed in 2.1.
Read the list archives -- you're probably posting messages in iso-8859-1 or utf-8 to a list set to English (us-ascii). Mailman CVS does not add footers if the charsets of the message and footers do not match.
That's strange then, I only use plain text and the same format has had a footer added to it by this list :-)
You're posting as
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Question for the gurus: could the upper case content type description be causing problems here?
--John
-- John Baxter jwblist@olympus.net Port Ludlow, WA, USA
"John" == John W Baxter <John> writes:
John> You're posting as
John> Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
John> Question for the gurus: could the upper case content type
John> description be causing problems here?
It very well could be. The problem is that *some* headers are case-sensitive (like Subject) and others are not (like Content-Type). I haven't been putting in random .lower() calls on every string, so we'll probably run into some of these issues.
Barry, do you think the email module should just deal with this somehow?
Ben
-- Brought to you by the letters L and H and the number 3. "Frungy! Frungy! Frungy!!" Debian GNU/Linux maintainer of Gimp and Nethack -- http://www.debian.org/
All headers should not be case sensitive, so far as I know.
This is right out of RFC822:
3.4.7. CASE INDEPENDENCE Except as noted, alphabetic strings may be represented in any combination of upper and lower case. The only syntactic units August 13, 1982 - 14 - RFC #822 Standard for ARPA Internet Text Messages which requires preservation of case information are: - text - qtext - dtext - ctext - quoted-pair - local-part, except "Postmaster"
Unless I am mistaken, this does not define any fields or sub-field names as case dependent. Those comparisons should all be done independent of case. Now if you are noting that the subject field is case independent, then you are probably right, subject is defined as "text".
At 11:30 AM 2002-03-11 +0900, Ben Gertzfield wrote:
"John" == John W Baxter <John> writes:
John> You're posting as John> Content-Type: TEXT/PLAIN; CHARSET=US-ASCII John> Question for the gurus: could the upper case content type John> description be causing problems here?
It very well could be. The problem is that *some* headers are case-sensitive (like Subject) and others are not (like Content-Type). I haven't been putting in random .lower() calls on every string, so we'll probably run into some of these issues.
Barry, do you think the email module should just deal with this somehow?
Ben
-- Brought to you by the letters L and H and the number 3. "Frungy! Frungy! Frungy!!" Debian GNU/Linux maintainer of Gimp and Nethack -- http://www.debian.org/
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers
-- War is an ugly thing, but it is not the ugliest of things. The decayed and degraded state of moral and patriotic feeling which thinks that nothing is worth war is much worse. A man who has nothing for which he is willing to fight, nothing he cares about more than his own personal safety, is a miserable creature who has no chance of being free, unless made so by the exertions of better men than himself. -- John Stuart Mill Nick Simicich - njs@scifi.squawk.com
"Nick" == Nick Simicich <njs@scifi.squawk.com> writes:
Nick> All headers should not be case sensitive, so far as I know.
Nick> This is right out of RFC822:
RFC822 has been supplanted by many many RFCs, but yes, we should be treating the charset and content-type both as non-case-sensitive.
Ben
-- Brought to you by the letters H and U and the number 5. "He's like.. some sort of.. non-giving up.. school guy!" Debian GNU/Linux maintainer of Gimp and Nethack -- http://www.debian.org/
"BG" == Ben Gertzfield <che@debian.org> writes:
"Nick" == Nick Simicich <njs@scifi.squawk.com> writes:
Nick> All headers should not be case sensitive, so far as I know.
Nick> This is right out of RFC822:
BG> RFC822 has been supplanted by many many RFCs, but yes, we
BG> should be treating the charset and content-type both as
BG> non-case-sensitive.
We should be good with Content-Type: as the email package's Message.get_type() coerces to lower case (as long as we always compare it with a lower case string <wink>). We just fixed the Charset class to do case insensitive comparisons, and to return a lower case coerced string as its str().
-Barry
On Sat, Mar 16, 2002 at 09:46:39AM +0900, Ben Gertzfield wrote:
"Nick" == Nick Simicich <njs@scifi.squawk.com> writes: Nick> All headers should not be case sensitive, so far as I know. Nick> This is right out of RFC822:
RFC822 has been supplanted by many many RFCs, but yes, we should be treating the charset and content-type both as non-case-sensitive.
You consider "RFC 2822" to be "many, many" RFC's?
Cheers -- jra
Jay R. Ashworth jra@baylink.com Member of the Technical Staff Baylink RFC 2100 The Suncoast Freenet The Things I Think Tampa Bay, Florida http://baylink.pitas.com +1 727 647 1274
"If you don't have a dream; how're you gonna have a dream come true?" -- Captain Sensible, The Damned (from South Pacific's "Happy Talk")
"BG" == Ben Gertzfield <che@debian.org> writes:
"John" == John W Baxter <John> writes:
John> You're posting as
John> Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
John> Question for the gurus: could the upper case content type
John> description be causing problems here?
BG> It very well could be. The problem is that *some* headers
BG> are case-sensitive (like Subject) and others are not
BG> (like Content-Type). I haven't been putting in random
BG> .lower() calls on every string, so we'll probably run
BG> into some of these issues.
BG> Barry, do you think the email module should just deal with
BG> this somehow?
There are a number of RFC-ish things I think email should eventually do (probably not for 1.1). E.g. it should enforce the RFC specified max and min on numbers of headers (e.g. RFC 2822 says From: must appear once and only once). We could do some more enforcement of case sensitivity, but I also think Mailman ought to be more robust.
I suspect that we're not doing case folding on parameters retrieved with email.Message.Message.get_param(). Note that get_type() already folds to lowercase, since it's obvious that MIME types are case insensitive. get_param() /matches/ case insensitively, but returns the case preserved version of the parameter.
I'm going to try to dig up Ben's patch and I'll double check that the parameters are being compared case insensitively.
-Barry
participants (6)
-
barry@zope.com
-
Ben Gertzfield
-
Colin Mackinlay
-
Jay R. Ashworth
-
John W Baxter
-
Nick Simicich