nmh-workers
[Top][All Lists]
Advanced

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

[Nmh-workers] attach


From: norm
Subject: [Nmh-workers] attach
Date: Sat, 15 Sep 2012 08:03:43 -0700

David Levine <address@hidden> writes:
>Norm wrote:
>
>> I don't know that whatnow's attach ever gave me a blank
>> Nmh-Attachment header.  What you are probably referring to
>> was my request that send silently remove any such
>> headers. I asked for that so that users could put them in
>> their templates to be filled in, or left blank at
>> composition time.
>
>I just committed the fix for that, but only in send(1).
>post(8) is coming.
>
>Also:
>
>Added check in send(1) of attach (default Nmh-Attachment)
>headers to ensure that only plain files are attached.
>Otherwise, it is a fatal error.  Note that whatnow's
>attach will continue to allow attachment of directories
>because it expands those out to their contents.  It
>doesn't check what the contents are, though.  That's why
>we needed to add this check.
>
>It does the right thing with symlinks, as long as they
>dereference to plain files.

It seems to me that, ideally, attach should never attach anything that
send would reject as an error. Is this too unreasonable a requirement?

If you accept that requirement then, given the above about send, I suggest
that:

  attach should reject with, an error message, any:

     Unreadable files (including directories)

     Dangling symbolic links

     Symbolic links to unreadable files (including unreadable directories)

     Directories or symbolic links to directories, unless the -r option is given

Even though attach should check symbolic links, it should attach a
symbolic link to an ordinary file as the link itself. (This would allow
the link to have a different suffix then the file linked to). That's what
it does now.

If the -r option is given then attach should recursively attach all files
(including files whose names begin with '.' ?) in any directories encountered.

Since a simple error, could inadvertently generate hundred of attachments,
maybe  attach should return with the number of files attached, when the -r
option is given, or perhaps always, for consistency.

Maybe requiring attach to not make send unhappy is overkill, and is not
worth the extra trouble?

    Norman Shapiro
    798 Barron Avenue
    Palo Alto CA 94306-3109
    (650) 565-8215
    address@hidden



reply via email to

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