Re: DOS text file attachments.

2008-02-06 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday, February  7 at 12:01 AM, quoth [EMAIL PROTECTED]:
> I think the point that the people on the Postfix mailing list were trying 
> to make is that the MUA (in this case mutt) should not be sending 
> something to the MTA that is marked as text/plain, but has CRLF line 
> endings since text/plain on Unix has just LF line endings.

Mmmm, I would put it slightly differently, because it depends on who 
should be responsible for MIME encoding: the MTA or the MUA.

Each platform has it's own line-ending standard for "plain old text 
files". On the other hand, "text/plain" has a very specific 
line-ending meaning in the context of MIME encoding. As specified in 
RFC 2046, section 4.1.1:

 The canonical form of any MIME "text" subtype MUST always
 represent a line break as a CRLF sequence.  Similarly, any
 occurrence of CRLF in MIME "text" MUST represent a line break.
 Use of CR and LF outside of line break sequences is also
 forbidden.

It seems clear, then, that in sending a MIME-encoded object, labeled 
"text/plain", with the wrong line endings, someone is at fault. The 
line endings CANNOT be preserved if the file is to be sent encoded as 
a MIME text/* object.

But, and here's the trick: it *WAS* correctly formatted. It's just 
that ordinarily, things are *NOT* correctly formatted. The MTA world 
has gotten so used to converting line endings on behalf of the user 
that the MUA world now rarely considers line-endings to be a problem 
they need to address (unless the MUA will be speaking SMTP directly).

So who is wrong? Is mutt wrong for being inconsistent: handing 
incorrectly encoded text to the MTA most of the time but correctly 
encoded text some of the time? Or is the MTA wrong for being lazy and 
assuming that the MUA *always* sends incorrectly encoded text? In the 
end, I don't think it matters.

What if the file had been left as-is, and the line endings had been 
recognized as not needing conversion? The receiver would receive a 
correctly encoded text/plain attachment, and when saving that 
attachment to disk, his MUA would convert the line endings to whatever 
the native scheme happened to be. There would be no extra lines, BUT 
the file's status as a "DOS text" file would vanish the instant the 
"DOS" was dropped from the label---there's no such thing as 
"dostext/plain", after all.

In the end, I think it all comes down to expectations. Mutt deals in 
text files, and expects that all files labeled as text files will be 
"native" text files (for the obvious reason that this is almost always 
a correct assumption). Text is a special-case MIME category: it is a 
category that indicates that line-ending preservation is unimportant 
and may be converted to whatever is most convenient. This is 
relatively easy to work around with proper labeling: the goal is 
simply to avoid labeling the file as something whose line-endings can 
change as necessary (in other words: *any* non-text label will work). 
For example, one could add a line to the mime.types file like this:

 application/dostxt dostxt

Then all files ending in ".dostxt" will be safely base64 encoded 
before being sent. The file's line endings would be preserved, and all 
the recipient would have to do is decode the base64 encoding and 
rename the file back to ending in ".txt".

Unfortunately, there is no way to tell mutt that the ".txt" ending is 
ambiguous and files ending in ".txt" need to be handled two different 
ways depending on whether they're *native* text or weirdly-encoded 
text.

> Maybe I just tell mutt to use a shell script as the MTA and I get 
> that to convert all text to LF line endings then pass it on to the 
> real MTA. Would that work ?

That would assure that the DOS file was correctly encoded as a 
text/plain attachment, yes. However, it would also make it impossible 
to identify as a DOS-text file on the recipient's end. It would appear 
as a DOS-text file on a Windows system, and as a Unix-text file on a 
Unix system, and as a Mac-text file on a Mac.

So it depends on what problem you're trying to solve: if you're trying 
to send a DOS-file, intact, through email, this is a bad idea. If 
you're trying to send a recipient-dependent text file, no matter what 
format it's saved in on your own system, then this would work 
perfectly.

At that point, though, I'd question why on earth you were dealing in 
DOS files on your Unix box. :)

> I assume all data from mutt to the MTA will be text ? i.e.  already 
> be base64 encoded if needs be ?

Yes.

Does that help?
~Kyle
- -- 
If I were you, I'd run!
- -- Mesh-Head
If you were me, you'd be 
good-looking.
- -- the Six-String Samurai
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFHqqGqBkIOoMqOI14RAmcvAKCVXhBQgCRduyQdGLuToFBqmJxMIACfZc+q
SgQrTqfWZB7RUzZJsDbTY50=
=5W9G
-END PGP SIGNATURE-


Re: DOS text file attachments.

2008-02-06 Thread scott . mutt
I think the point that the people on the Postfix mailing list were trying 
to make is that the MUA (in this case mutt) should not be sending something 
to the MTA that is marked as text/plain, but has CRLF line endings since 
text/plain on Unix has just LF line endings.


Me, I don't know what should do what with what for this type of file.  If 
it is converted by the MUA to have just LF line endings then the Windows PC 
I'm sending it to will still see it as a DOS text file since the MTA has to 
convert it to CRLF for the smtp protocol.  Then again if the MTA noticed 
that the lines already had CRLF on the end and didn't "convert" it then 
that would work too.  Also if the libmagic stuff noticed that a file was 
DOS text and reported it as application/octet-stream then I guess that 
would work too.


Maybe I just tell mutt to use a shell script as the MTA and I get that to 
convert all text to LF line endings then pass it on to the real MTA.  Would 
that work ?  I assume all data from mutt to the MTA will be text ? i.e.  
already be base64 encoded if needs be ?


Thanks everyone or your help.

Scott.

On Tue, Feb 05, 2008 at 12:08:07PM -0600, Kyle Wheeler wrote:

On Tuesday, February  5 at 04:35 PM, quoth Michael Kjorling:

On 5 Feb 2008 10:00 -0600, by [EMAIL PROTECTED] (Kyle Wheeler):
The best way to send a DOS file, if it needs to *stay* a DOS file, is 
to compress it (e.g. to zip it) and send the compressed form. When it 
is decompressed, it will return to its original DOS form.


This will obviously work. I was wondering though, if sent as an 
application/octet-stream MIME part, shouldn't the file be encoded by 
mutt in such a way that it can get reconstructed accurately on the 
receiver side? Yes, I know that calling plain text a/o-s is a 
borderline case, but sometimes compressing might not really be an 
option. (Say, if the recipient might want to read the attachment on a 
cell phone or PDA, which may not even be able to uncompress formats 
taken for granted on PCs.)


Perhaps, though there are two considerations to that: first, encoding 
as a/o-s is a common spammer trick that most people do not employ (so 
it may get your message tagged as spam), and second, there's no 
guarantee that a cell phone or PDA can decode base64 either.


Lastly, why would someone send a DOS text file to a cell phone (that's  
incapable of doing simple things like decompress zip files) in the 
first place?


~Kyle
--
What progress we are making. In the Middle Ages they would have burned 
me. Now they are content with burning my books.

  -- Sigmund Freud





Re: Extracting email addresses to abook

2008-02-06 Thread Michael
On Wed, Feb 06, 2008 at 07:03:10AM -0700, Michael wrote:
> 443-653-1569 wrote:
> > Anyone help me with a method for extracting email addresses from incoming
> > mail and placing them in abook (or perhaps some other more capable
> > database), Using "aliases" just doesn't hack it anymore.
> > 
> > Bill Roberts
> posted too quick:
> http://www.spinnaker.de/lbdb/

sorry, guess my previous answer didn't go out ;)



Re: viewing html emails with images

2008-02-06 Thread senator galt
On Feb 5, 2008 2:44 PM, Christian Ebert <[EMAIL PROTECTED]> wrote:
> I gather from your other answer that it works "in principle" ;)
>
Yes. It does! :)

> this looks like you made some mistake when pasting(?) the above
> entry. Make sure there are no whitespaces after the backslashes,
> check the quotation marks.
you are right. I removed the whitespaces after the backslashes and it
works now. it was an error while pasting.

I want to thank you for the package muttils. viewhtmlmsg is exactly
what I was looking for. I almost gave up on mutt because of that
missing functionality. Even the other scripts like urlpager are cool
and I've started using them.


Re: Extracting email addresses to abook

2008-02-06 Thread Michael
443-653-1569 wrote:
> Anyone help me with a method for extracting email addresses from incoming
> mail and placing them in abook (or perhaps some other more capable
> database), Using "aliases" just doesn't hack it anymore.
> 
> Bill Roberts
posted too quick:
http://www.spinnaker.de/lbdb/


Extracting email addresses to abook

2008-02-06 Thread 443-653-1569
Anyone help me with a method for extracting email addresses from incoming
mail and placing them in abook (or perhaps some other more capable
database), Using "aliases" just doesn't hack it anymore.

Bill Roberts


pgp7kvXlYPp0l.pgp
Description: PGP signature