On Sat, Feb 17, 2018 at 9:52 AM, Paride Legovini <p...@ninthfloor.org> wrote:

> On 2018-02-17 18:30, Ben Wong wrote:
> > On Sat, 18 Mar 2017 23:43:45 +0100 Steffen Nurpmeso <stef...@sdaoden.eu
> > <mailto:stef...@sdaoden.eu>> wrote:
> >>
> >> So here i as the maintainer of the subject jump in and remark that
> >> the problem of the bug report you pointed to was a non-standard
> >> option of the Debian bsd-mail, our command line is a superset of
> >> POSIX mailx.  (Unfortunately v14.9.0 has still not landed, so that
> >> we offer no possibility to define custom headers; and it will not
> >> be the Debian -a i think it was, which, also if i recall
> >> correctly, has been patched into BSD-mail after Heirloom added -a
> >> for adding attachments, which i think of as a logical and good
> >> decision.)
> >
> > I see that Buster has s-nail v14.9, which has custom headers. Does that
> > mean we can hope for it to provide /usr/bin/mail?
>
> Hello from the new maintainer of the s-nail Debian package.
>
> It seems to me that, even if now s-nail supports custom headers, the
> incompatibility isn't solved: in bsd-mail the '-a' flag is used to add
> custom headers, while in s-nail '-a' is for attaching files.
>
> While I'd really like s-nail to provide /usr/bin/main, I don't see an
> easy way to solve this issue.
>
> Paride
>

Hello Paride,

Any idea what Steffen was thinking of doing?

It seems this is fundamentally a problem with Debian packages and scripts
relying on a non-standard extension.

Perhaps there could be a new program /usr/bin/debian-mailx which is
guaranteed to always work that way, no matter which underlying "mail"
program is installed. For 'mailutils', it would just be a wrapper, passing
the arguments untouched. For 's-nail', it'd convert the -a syntax to
s-nail's customhdr.

Is it possible to identify which Debian packages require mail to use "-a"
to mean custom header?
Something like, grep "mail.*-a"? ¹

Even if it's not possible to find every package that uses "-a", it might
still be good to have something like /usr/bin/debian-mailx, so new Debian
scripts and packages can be written in a way that doesn't rely on "mail"
being a specific implementation.

--Ben

¹ More specifically, on a Debian machine with every package unpacked:
      dpkg -S $(rgrep -lIs "mail.*-a" /)

  or, to avoid many false positives,
      dpkg -S $( rgrep -slIP "\bmailx?(?=\s|[\"']).*(?<=\s|[\"'])-a" / )

Reply via email to