[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] whatnow: can't attach because no header field name was
Anthony J. Bentley
Re: [Nmh-workers] whatnow: can't attach because no header field name was given.
Thu, 15 Mar 2012 02:35:16 -0600
"Ronald F. Guilmette" writes:
> In message <address@hidden>, you wrote:
> >"Ronald F. Guilmette" writes:
> >> Sorry. I feel sure that this must be an FAQ, but how does one get this
> >> message to go away, you know, so that I can actually send an attachment?
> >Try in .mh_profile:
> >send: -attach X-MH-Attachment
> >whatnow: -attach X-MH-Attachment
> >I actually only found out about this very recently by searching the lists.
> Ummm... Well, now at least the failure message is different...
> What now? attach four-leaf.jpg
> What now? s
> mhbuild: draft shouldn't contain MIME-Version: field
> What now?
You're probably mime-ifying the message somehow (maybe in your profile).
I get the same results if I manually mime-ify:
What now? mime
What now? attach /tmp/foo
What now? send
mhbuild: draft shouldn't contain MIME-Version: field
If I don't run mime, it goes through fine.
> P.S. After trying your suggested fix, I realized that I wasn't sure if
> you meant that I should put the "-attach X-MH-Attachment" option on the
> send: or on the whatnow: or on both.
Both lines go in .mh_profile.
> When the option is appended to only to the send: it seems to have no effect
> and I still get the "can't attach because no header field name was given."
Right. When you use "attach" in whatnow, this header gets added to the draft:
If you don't have "-attach X-MH-Attachment", whatnow doesn't know what
header to put in and errors out. This isn't documented in the whatnow(1)
manpage at all, unfortunately.
> When I attached it only to the whatnow: everything _seemed_ to
> work, but the e-mail message, when delivered, actually had no attachment
> whatsoever. :-(
Because send isn't told to look for a header, and thus doesn't perform the
replacement described in the man page. From send(1):
If a header-field-name is supplied using the -attach option, the draft
is scanned for a header whose field name matches the supplied header-
field-name. The draft is converted to a MIME message if one or more
matches are found. This conversion occurs before all other processing.
> Full disclosure: I am using NMH version 1.3. Alas, version 1.4 has not
> been ported to FreeBSD yet. (Is this the real root of the problem?)
I'm on 1.4 (it's in OpenBSD ports), but I believe it works in previous
versions too. The mailing list posts were several years old...
Anthony J. Bentley