nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] suppress Content-ID's with new mhbuild option?


From: David Levine
Subject: Re: [Nmh-workers] suppress Content-ID's with new mhbuild option?
Date: Sun, 29 Jan 2006 22:46:38 -0500

> > > Can you perhaps define the sendproc profile entry to be a filter that
> > > forwards options and its output to send?
> > 
> > That could work.  It's easy to filter out all Content-ID:
> > lines.  But if I wanted to keep forwarded messages perfectly
> > intact, it's not as simple.  It usually doesn't matter, but
> > some recipients might want to see _all_ original header lines
> > in forwarded messages.
> 
> I agree. Isn't it guaranteed that a blank line separates headers from
> body? If so, the filter can be something like this
> 
> awk '/^$/ { body=1 } \!body && /^Content-ID:/ { next } { print }'

We'd need to consider MIME context, in order to not suppress
Content-ID: lines inside of attachments:

  To: you
  From: me
  Subject: foo
  MIME-Version: 1.0
  Content-Type: text/plain; charset="us-ascii"
  Content-ID: <dispensable>

  ------- =_aaaaaaaaaa0
  Content-Type: text/plain
  Content-Disposition: attachment; filename="foo.txt"

  To: someone
  From: someone else
  Subject: indispensable Content-ID: header
  MIME-Version: 1.0
  Content-Type: text/plain; charset="us-ascii"
  Content-ID: <indispensable!>

  Take a look at the Content-ID: header for this message, will ya!

  ------- =_aaaaaaaaaa0--

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]