Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling(OT???)

2012-08-29 Thread Kevin Cosgrove

On 29 August 2012 at 11:03, Ken Hornstein  wrote:

> >I verified that Exchange doesn't mangle outgoing x-sh
> >attachments.  But it (V6.5) does mangle them when they're
> >incoming.  How odd.
> 
> Even encoded as Base64?  If that is the case, then that's damn unfriendly.

Until I found .sh worked, then yes, Exchange would alter incoming Base64
on _some_ messages.  For instance, it would leave .tgz alone, and it 
leaves .sh alone.

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling(OT???)

2012-08-29 Thread Ken Hornstein
>I verified that Exchange doesn't mangle outgoing x-sh
>attachments.  But it (V6.5) does mangle them when they're
>incoming.  How odd.

Even encoded as Base64?  If that is the case, then that's damn unfriendly.

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling(OT???)

2012-08-29 Thread Kevin Cosgrove

On 29 August 2012 at 10:43, David Levine  wrote:

> Kevin wrote:
> > I chose only the .sh extension.  Nmh picked the type and encoding.
> > The message was sent as:
> >
> >   Content-Type: application/x-sh
> >   Content-Transfer-Encoding: base64
> >
> > Exchange left that alone.
> 
> I verified that Exchange doesn't mangle outgoing x-sh
> attachments.  But it (V6.5) does mangle them when they're
> incoming.  How odd.

I don't have any trouble with outgoing messages being altered in
transit.  My troubles have always been with incoming messages
through Exchange.  Even that wasn't a problem until sometime
during the Spring of 2012, having worked fine with all the mail
systems I encountered for the prior ~20 years.

After going through the Exchange server I get email from there
with fetchmail, which passes the mail to slocal, which delivers
some messages right away and sends others through procmail, and
procmail filters messages through spamassassin.  What can I say,
that works for me.

Cheerio

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling(OT???)

2012-08-29 Thread David Levine
Kevin wrote:

> I chose only the .sh extension.  Nmh picked the type and encoding.
> The message was sent as:
>
>   Content-Type: application/x-sh
>   Content-Transfer-Encoding: base64
>
> Exchange left that alone.

I verified that Exchange doesn't mangle outgoing x-sh
attachments.  But it (V6.5) does mangle them when they're
incoming.  How odd.

David

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-28 Thread Kevin Cosgrove

On 28 August 2012 at 12:27, Ken Hornstein  wrote:

> >For me .bin failed.  Whereas .sh works just fine.  Yippee!!!
> 
> So, just for my curiosity ... what was the MIME type and
> Content-Transfer-Encoding that you ended up using?

I chose only the .sh extension.  Nmh picked the type and encoding.
The message was sent as:

  Content-Type: application/x-sh
  Content-Transfer-Encoding: base64

Exchange left that alone.

Sending the attachment as .bin ended up as text/plain and Exchange 
had a fun time changing the contents of that.

Cheerio...

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-28 Thread Ken Hornstein
>For me .bin failed.  Whereas .sh works just fine.  Yippee!!!

So, just for my curiosity ... what was the MIME type and
Content-Transfer-Encoding that you ended up using?

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-28 Thread Kevin Cosgrove

On 20 August 2012 at 14:04, David Levine  wrote:

> Kevin wrote:
> 
> > > [Ken:]
> > > - Maybe a Content-Type of application/octet-stream would work?
> > 
> > I already tried a variation on that.  I gave it a fake .exe
> > extension, thinking that Exchange might look more favorably on
> > it.  No joy there.
> 
> I didn't have any luck with it either.  Or with .bin or .sh.

For me .bin failed.  Whereas .sh works just fine.  Yippee!!!

Thanks for the brain amplification to all who responded.

I'm a happy guy...  :^)


--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-23 Thread Kevin Cosgrove

On 20 August 2012 at 12:38, Ken Hornstein  wrote:

> So, some suggestions for you, in no particular order.
> 
> - Maybe putting a Content-Transfer-Encoding: 7bit would help on your
>   attachents?  Unfortunately we can't specify the CTE in nmh (but it's
>   something I always wanted to add); you'd have to add it to the draft
>   manually.

Still trying things.  Thought I'd report that the 7bit trick didn't 
work for the Exchange server I'm dealing with.

FYI

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-20 Thread David Levine
Kevin wrote:

> > [Ken:]
> > - Maybe a Content-Type of application/octet-stream would work?
> 
> I already tried a variation on that.  I gave it a fake .exe
> extension, thinking that Exchange might look more favorably on
> it.  No joy there.

I didn't have any luck with it either.  Or with .bin or .sh.

Here's one thing that did work:  the three character sequence
of [backspace] [horizontal tab] [line feed] in the file.  It
can be at the end of a comment.  I'd hate to rely on that, but
maybe it will give you some clue to what Exchange is doing.

Or an 8-bit character works.

David

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-20 Thread Jerrad Pierce
Sending files as ".exe" is probably not the wisest way to work around things
either, as you wil fall afoul of virus heuristics. ".bin" seems to be the
more conventional way to approach this.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-20 Thread Ken Hornstein
>> - Maybe a Content-Type of application/octet-stream would work?
>>   If you want to do that via nmh-attachment ... from what I
>>   remember it looks those up via suffixes that are listed via the
>>   normal mhn mechanism (mhn.defaults).  Hm, I see that files that
>>   end in .sh will be sent via application/x-sh; maybe that would
>>   work?
>
>I already tried a variation on that.  I gave it a fake .exe
>extension, thinking that Exchange might look more favorably on
>it.  No joy there.

So if you tried that with nmh-attachment ... that might not have
done what you wanted.  _If_ the nmh-attachment code can't find a
matching extension in mhn.defaults (the default one doesn't have
anything that matches .exe), it looks through the file to be attached;
if there is nothing with the high bit set, it defaults to text/plain,
otherwise application/octet-stream.  So if your "fake" exe file was
really a shar file, it probably was sent as text/plain.


--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-20 Thread Kevin Cosgrove

On 20 August 2012 at 12:38, Ken Hornstein  wrote:

> I was thinking that you really meant "base 64" instead of uuencode
> ... until you mentioned shar files.  My next thought was, "People
> still use shar files?!??!".

Should I send you a photo of me with my pet dinosaur?  ;-)

What can I say, I used to run UUCP with sendmail and MH-3.  Then I 
got into the mindset of "if it's not broken, don't fix it".  Exchange 
just broke it after running just fine for 20 years.

> - Maybe putting a Content-Transfer-Encoding: 7bit would help on
>   your attachments?  Unfortunately we can't specify the CTE in nmh
>   (but it's something I always wanted to add); you'd have to add
>   it to the draft manually.

Excellent idea.  I'll try that.  Given the quoted-printable
7/8-bit wars I've had with Exchange over the years, I'm
cautiously pessimistic about the outcome.

> - Maybe a Content-Disposition of inline would work?  You CAN
>   set that via mhbuild directives.

I'll try that too.  I'll have to have a look at the mhbuild
manual as I've never used mhbuild before.

> - Maybe a Content-Type of application/octet-stream would work?
>   If you want to do that via nmh-attachment ... from what I
>   remember it looks those up via suffixes that are listed via the
>   normal mhn mechanism (mhn.defaults).  Hm, I see that files that
>   end in .sh will be sent via application/x-sh; maybe that would
>   work?

I already tried a variation on that.  I gave it a fake .exe
extension, thinking that Exchange might look more favorably on
it.  No joy there.

Thanks!

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-20 Thread Ken Hornstein
>The Exchange server alters uuencoded content by changing
>text/plain into the MS version of quoted printable text, with
>"=3D" in place of "=", etc.  That made shar files (shell scripts)
>fail badly after transiting through that email path.

I was thinking that you really meant "base 64" instead of uuencode
... until you mentioned shar files.  My next thought was, "People
still use shar files?!??!".

So, some suggestions for you, in no particular order.

- Maybe putting a Content-Transfer-Encoding: 7bit would help on your
  attachents?  Unfortunately we can't specify the CTE in nmh (but it's
  something I always wanted to add); you'd have to add it to the draft
  manually.
- Maybe a Content-Disposition of inline would work?  You CAN set that via
  mhbuild directives.
- Maybe a Content-Type of application/octet-stream would work?  If you want
  to do that via nmh-attachment ... from what I remember it looks those up
  via suffixes that are listed via the normal mhn mechanism (mhn.defaults).
  Hm, I see that files that end in .sh will be sent via application/x-sh;
  maybe that would work?

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread Lyndon Nerenberg

On 2012-08-16, at 19:03 PM, valdis.kletni...@vt.edu wrote:

> Almost, but not quite correct.
> 
> Unfortunately, that will corrupt a file that happened to have a bare 
> carriage-return
> character that wasn't part of a CR/LF pair.  (Of course, having such a 
> character
> embedded in the middle of a line is possibly a Bad Idea... but that's usually 
> not
> considered sufficient grounds for silent corruption of a file).

True, but in 20 years it has never once bitten me in practice.

signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread valdis . kletnieks
On Thu, 16 Aug 2012 18:37:17 -0700, Lyndon Nerenberg said:

> tr -d \015

Almost, but not quite correct.

Unfortunately, that will corrupt a file that happened to have a bare 
carriage-return
character that wasn't part of a CR/LF pair.  (Of course, having such a character
embedded in the middle of a line is possibly a Bad Idea... but that's usually 
not
considered sufficient grounds for silent corruption of a file).



pgpzUWFko4HZ9.pgp
Description: PGP signature
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread Lyndon Nerenberg

On 2012-08-16, at 17:38 PM, David Levine wrote:

> I think that's the best way to handle it.  Howard mentioned
> dos2unix, which I use also.

tr -d \015



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread David Levine
Kevin wrote:

> I'm trying to use nmh to craft my emails such that
> Exchange won't mangle it.

Good luck with that :-/  I've given up, I've found Exchange
to be unpredictable.

> Is there a better way to use mhn to unpack the
> attachments, converting DOS form back to UNIX form?  I
> suppose I could write a shell script to alter the files
> after mhn unpacks them.

I think that's the best way to handle it.  Howard mentioned
dos2unix, which I use also.

> Is there a better way to use nmh-attachment and send to
> form a message of a different type,
> e.g. application/octet-stream, so that Exchange might not
> mangle it?

I couldn't even get that to work.  Maybe an embedded
non-printable character would?

David

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread Kevin Cosgrove

On 16 August 2012 at 12:55, Howard Bampton  wrote:

> On Thu, Aug 16, 2012 at 12:11 PM, Kevin Cosgrove  wrote:
> 
> > Is there a better way to use mhn to unpack the attachments,
> > converting DOS form back to UNIX form?  I suppose I could write a
> > shell script to alter the files after mhn unpacks them.
> 
> It doesn't fix the actual problem, but there is a dos2unix (and
> unix2dos) command that will handle line ending issues. It is available
> for most (all?) modern UNIX-like OS's.

That, or an equivalent sed command, might be the most expedient option.

Thanks

--
Kevin



___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] NMH Work-arounds for Exchange server mangling (OT???)

2012-08-16 Thread Howard Bampton
On Thu, Aug 16, 2012 at 12:11 PM, Kevin Cosgrove  wrote:

> Is there a better way to use mhn to unpack the attachments,
> converting DOS form back to UNIX form?  I suppose I could write a
> shell script to alter the files after mhn unpacks them.

It doesn't fix the actual problem, but there is a dos2unix (and
unix2dos) command that will handle line ending issues. It is available
for most (all?) modern UNIX-like OS's.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers