markus schnalke [Tue, 10 Jul 2012 18:53:05 +0000 (20:53 +0200)]
Added Neil Rickert's mhpgp, the companion to mhsign.
Currently it is only usable on the command line directly.
In the future, it should be invoked by show(1) as needed.
markus schnalke [Sat, 7 Jul 2012 13:30:29 +0000 (15:30 +0200)]
show: Print type of MIME part instead of error message if not displayable.
A further step in the general rework of show/mhshow. Print less error
messages. Not being able to directly display some attachment is no
exceptional event, but quite normal. Therefore, no error message should
be printed but an information message that there is a MIME part.
Printing to stdout makes the message to be integrated into the normal
output.
There's more rework of show needed.
markus schnalke [Sat, 7 Jul 2012 10:31:38 +0000 (12:31 +0200)]
send: Sign and encrypt messages automatically, based on Sign: and Enc: Hdrs.
Currently, the value of the header fields is ignored. The sole presence
of such a header caused signing or encryption.
markus schnalke [Sat, 7 Jul 2012 08:14:03 +0000 (10:14 +0200)]
whatnow: Re-integrated whom(1); cleanups.
Removed reference to `send -watch', which was removed in 9677896bbb11f7b49ca3e1665601407b6c7a459f
Reordered the options.
markus schnalke [Fri, 6 Jul 2012 15:51:37 +0000 (17:51 +0200)]
Re-added whom(1). This implementation is written from scratch.
This new version of whom(1) is quite different to the old one,
yet it serves the same purpose: listing the recipients of a message.
It still misses the ability to process +folder and msgs arguments.
As this implementation is new and not much practically tested,
it may change in the future, if flaws appear.
markus schnalke [Thu, 28 Jun 2012 22:20:45 +0000 (00:20 +0200)]
Completely removed the backup-prefix (,). We move to +trash instead.
mhbuild does not create `,foo.orig' but `foo.orig' now. Maybe it should
move the file to +trash as well ... this is likely to be changed.
Temporary files of bcc mails get removed now.
markus schnalke [Thu, 28 Jun 2012 21:45:01 +0000 (23:45 +0200)]
mhbuild: Fixed order of file names in error messages.
(The argument order is: rename(src, dest) and admonish("foo", "%s", "bar")
produces: ``bar foo''.)
markus schnalke [Thu, 28 Jun 2012 18:08:16 +0000 (20:08 +0200)]
Removed context_foil(). We don't need it anymore.
To not read the profile and context, don't call context_read().
Anyway, all mmh tools should read the context. slocal, which is
not truly part of mmh, does not.
markus schnalke [Wed, 27 Jun 2012 20:01:55 +0000 (22:01 +0200)]
ali: Either read default alias files or the ones on command line.
Renamed -alias to -file because the semantic changed and the new
name appears to be better suited.
markus schnalke [Wed, 27 Jun 2012 12:52:42 +0000 (14:52 +0200)]
send,spost: No more use of -alias, spost reads Aliasfile from the profile.
The profile entry Aliasfile was introduced in MH-6.7 to replace the
-alias switches. Later, the profile entry was enhanced to support multiple
files. Now that spost reads the profile itself, there is no more need
to pass the file with switches. Operating with varying sets of alias
files is now only possible with different profiles, but that should be
a rare setup.
markus schnalke [Wed, 27 Jun 2012 12:23:35 +0000 (14:23 +0200)]
spost: Read profile and context now. Removed -library switch.
spost is a full part of the mmh toolchest, hence, it shall read the
profile/context. This will remove the need to pass profile information
from send to spost via command line switches.
In January 2012, there had been a discussion on the nmh-workers ML
whether post should read the profile/context. There wasn't a clear
answer. It behavior was mainly motivated by the historic situation,
it seems. My opinion on the topic goes into the direction that every
tool that is part of the mmh toolchest should read the profile. That
is a clear and simple concept. Using MH tools without wanting to
interact with MH (like mhmail had been) is no more a practical problem.
markus schnalke [Wed, 27 Jun 2012 11:15:47 +0000 (13:15 +0200)]
mhmail: Read the context!
mhmail will change from a mailx-replacment to an alternative to
`comp -ed prompter', thus being a send front-end. Hence, mhmail
should not stay outside the profile/context respecting mmh toolchest.
markus schnalke [Wed, 27 Jun 2012 10:30:38 +0000 (12:30 +0200)]
slocal: Do not at all interact with the context or profile.
Slocal is not a true part of mmh, it is an MDA that is (currently)
shipped with the MUA mmh.
markus schnalke [Wed, 13 Jun 2012 10:02:06 +0000 (12:02 +0200)]
Renamed switches variable to ease automatic text extraction.
Now, it's easier to get a list of all switches of a program from the
source code. The change improves the homogeneity, too.
markus schnalke [Fri, 8 Jun 2012 08:18:47 +0000 (10:18 +0200)]
Whatnow prompt: From now on, detaching only by numbers.
-n flag of `detach' is now default and thus removed.
(`alist' prints the numbers by default.)
If by mistake a whole bunch of of files was added (e.g. `attach *'),
these attachments should be removed with the editor in the draft.
markus schnalke [Sat, 5 May 2012 09:48:11 +0000 (11:48 +0200)]
prompter: Various rework.
Removed -kill and -erase as they are not needed anymore today.
Removed -doteof/-nodoteof. -nodoteof had been the default already.
Made the yet hidden switches -body/-nobody visible, but with a slightly
different meaning. See recent changes in the man page prompter(1) for
details. (Eventually, one can have mutt-like message composing.)
markus schnalke [Sat, 5 May 2012 09:43:24 +0000 (11:43 +0200)]
mhmail: For mailx(1) compat: A period alone on a line means EOF.
Also renamed the -body switch to -bodytext because its argument is the
body text and not a file containing the body text. The rename should
clarify this. After all, typing `-body' results in the same as typing
`-bodytext' or only `-b'.
Now, fgets() is used instead of fread(), thus not allowing null-bytes
in the input anymore. This should be no restriction.
markus schnalke [Sat, 5 May 2012 09:38:23 +0000 (11:38 +0200)]
mhmail: For mailx(1) compat: A period alone on a line means EOF.
Also renamed the -body switch to -bodytext because its argument is the
body text and not a file containing the body text. The rename should
clarify this. After all, typing `-body' results in the same as typing
`-bodytext' or only `-b'.
markus schnalke [Sat, 5 May 2012 06:14:26 +0000 (08:14 +0200)]
mhmail: Removed hidden -resent and -queued switches.
Mhmail is intended to provide only a simple mail(1) interface to mmh
for the system. For all fancy stuff, use the mmh tools directly.
The -queued switch is not supported by spost anyway. For resending
messages, use dist not mhmail.
markus schnalke [Sat, 5 May 2012 06:05:22 +0000 (08:05 +0200)]
Require at least 2 chars for `no' variants of switches.
This results in:
ali -n --> -normalize
ali -no --> ambiguous
folder -n --> unknown (don't know if this case is good)
folder -no --> ambiguous
markus schnalke [Sat, 5 May 2012 05:55:20 +0000 (07:55 +0200)]
Don't require a length for switch prefixes without good reason.
E.g. there's no reason (anymore?) to require the user to type `whatnow -prom'
when `whatnow -p' is already distinguishing.
markus schnalke [Sat, 5 May 2012 05:53:09 +0000 (07:53 +0200)]
flist: Removed the hidden -total switch.
It was simply the inverse of the visible -fast switch. -nofast was -total
and -fast was -nototal. Now, the hidden pair went away.
markus schnalke [Tue, 1 May 2012 15:16:34 +0000 (17:16 +0200)]
Removed the altmsglink (named `@') and env var `$editalt' for repl and dist.
The env var $mhaltmsg already provides everything. We just get rid of
compat redundancy.
We also dropped the lstat() check. lstat() is POSIX and we assume any
modern Unix system to support symbolic links. Also, there's only one
invocation of lstat() left in uip/flist.c.
markus schnalke [Tue, 1 May 2012 13:30:39 +0000 (15:30 +0200)]
Removed msgchk(1) as it is hardly useful without POP support.
It is questionable if msgchk(1) provides more information than:
ls -l /var/mail/meillo
It does separate between old and new mail, but that's not very useful
and can be found out with stat(1) too. A very small shell script should
be equally useful, if there's someone who really uses msgchk(1) and not
simply `inc's.
Concerning the administrative uses of msgchk(1), i.e. querying a set of
users, that's no MUA's task and thus a reason to remove the tool. But
eventually, the question remains the same: What does it provide more than
`ls -l' and `ls -lu'? Is it worth to keep it around? IMO, no.
markus schnalke [Tue, 1 May 2012 13:01:36 +0000 (15:01 +0200)]
Renamed -version switch to -Version to remove the conflict with -verbose.
Now, `mhlist -V' prints the version and `mhlist -v' lists verbosely.
There are only a few switches left that conflict on the first character,
apart from the inverted (no*) variants.
markus schnalke [Tue, 1 May 2012 12:48:59 +0000 (14:48 +0200)]
folder: Never display column headers (removed -header).
Also removed the full-stop (dot) at the end of each line. It looked rather
strange to have it there.
markus schnalke [Tue, 1 May 2012 12:38:44 +0000 (14:38 +0200)]
Bring in all of the mh-e support that is actually used
to be compiled by default, and garbage collect the stuff that is not used.
Pulled in from nmh. Thanks to Ken Hornstein.
Concerning mmh only:
- The FIXME comments about the missing checks for existing drafts.
- mh-e support of mmh is not much more than providing the -build switches.
It might get dropped in the future.
markus schnalke [Tue, 1 May 2012 11:53:32 +0000 (13:53 +0200)]
mhbuild: Removed -contentid switch, which was an Outlook 2002 workaround.
Explanation:
Outlook 2002 won't display attachments that have a Content-ID header.
This is a bug in Outlook 2002, not in mhbuild. There used to be this
-nocontentid switch to prevent Content-ID headers to be inserted. As I
consider it wrong to complicate all other MUAs instead of forcing the
developers and users of broken MUAs to fix or change their software,
I removed it.
You can still workaround the bug in the following way: invoke
`e mhbuild' manually at the Whatnow prompt and edit the draft again
thereafter, removing the Content-ID headers. Then send it.
markus schnalke [Tue, 1 May 2012 11:21:16 +0000 (13:21 +0200)]
mhbuild: Don't list anything (removed -list and -header).
For displaying the MIME structure, use mhlist(1). If you are curious what
mhbuild(1) had created, simply run mhlist(1) on the same file afterwards.
markus schnalke [Tue, 1 May 2012 09:37:53 +0000 (11:37 +0200)]
mhbuild: Removed the -ebcdicsafe switch.
It only influenced MIME messages, where quoted-printable encoding encoded
some punctuation chars (e.g. $) as well. I guess this is not much of a
problem anymore today. The switch was deactivated by default and didn't even
appear in the 1991's version of Jerry Peek's MH book. In the 1999's version
there is a parenthesed note about the switch, not more. I guess we won't
miss it.
markus schnalke [Tue, 1 May 2012 08:28:52 +0000 (10:28 +0200)]
burst: Fixed handling of trailing text; removed -inplace and -quiet.
The trailing text had been part of the last message extracted, now it is
ignored, conforming to the documentation.
Removing the -inplace switch (thus making -noinplace the default) simplified
the code and removed the possibility to lose data.
-quiet supressed warnings (``message is not in digest format''). Warnings
should be displayed. To though suppress them, redirect stderr to /dev/null.
I was unsure if I should make -verbose the default (i.e. remove -verbose
but have -quiet) as it provides similar useful information like inc(1).
I decided against it, because in Unix silence rules. However, I like to have
``burst: -verbose'' in my profile.
markus schnalke [Tue, 1 May 2012 06:09:56 +0000 (08:09 +0200)]
whatnow: Simplified and clarified (or fixed?) the situation of failed edits.
If the initial edit fails, no new draft is created, but any existing
re-used draft is preserved. Failures of later edits are ignored and
another prompt is printed.
markus schnalke [Mon, 30 Apr 2012 18:38:46 +0000 (20:38 +0200)]
Removed -nowhatnowproc switch as it does nothing useful.
The result of using it is the same as using `-whatnowproc /bin/true':
The draft gets created and left in the draft folder. As a replacement
exists, we surely don't need keep -nowhatnowproc.
markus schnalke [Mon, 30 Apr 2012 16:52:19 +0000 (18:52 +0200)]
Rework in charset code. (Includes renaming.)
Renamed check_charset() to is_native_charset(), and sbr/check_charset.c to
sbr/charset.c. Removed caching in favor for simpler code.
is_native_charset() does not check for prefixes anymore. The code didn't
match the comments anyway and it matched when comparing the first 10 [sic!]
chars of `ISO-8859-1whatever' with `ISO-8859-11', which is not wanted.
markus schnalke [Mon, 30 Apr 2012 14:33:55 +0000 (16:33 +0200)]
Dropped old show(1) and renamed mhshow(1) to show(1).
If you do want to display non-MIME messages the old way, you can use:
mhl `mhpath ...`
The choice of renaming was hard to decide because I will introduce confusion
and breaks the interface (mmh broke it already!). I though renamed, because
the new situation is what we actually want: One program to display messages
in a sane way. We used to type `show' and silently got `mhshow' when it
contained non-trivial MIME content. That was a workaround and clearly not
straight-forward. The improve the situation show(1) needed to be dropped.
Because users don't want to type `mhshow', I decided to renamed it to `show'.
Hope I won't introduce too many inconveniences with this decision.
markus schnalke [Sat, 14 Apr 2012 20:32:02 +0000 (22:32 +0200)]
mhshow: Add header and separation when displaying multiple messages.
We do it similar to the way mhl(1) does it.
The -header of show(1) is not added to mhshow(1). You can though have it,
by using the mhl `MessageName' pseudo-component.
markus schnalke [Sat, 14 Apr 2012 18:13:04 +0000 (20:13 +0200)]
mhl: Don't invoke the pager anymore.
As show(1) will soon be replaced by mhshow(1), mhl will be hidden behind
mhshow(1), which does invoke a pager now itself. Hence, no need for mhl(1)
to deal with it.
markus schnalke [Sat, 14 Apr 2012 17:59:54 +0000 (19:59 +0200)]
mhshow: Automatically invoke (one) pager for the whole message, if on TTY.
Mhshow used to invoke the pager for each of the text/plain parts
independently. Now, we invoke it once for the whole message.
Remember: We serialize!
(Mhl(1) invokes a pager too, currently, but not much longer.)
markus schnalke [Sat, 14 Apr 2012 16:06:04 +0000 (18:06 +0200)]
mhshow-show-*: Made %e escape the default, i.e. always serialize the output.
Never invoke several content display processes in parallel, but always
wait for the previous to finish before executing the next one. The idea
behind this is generating console output only, but not spawning any
graphical windows. All output of displaying one message should go to one
single pager invocation. Any other kinds of attachments are to be stored
and afterwards displayed manually. This is the way all the other MUAs do it
and it matches the modern understanding of emails: a message and attachments.
This is contrary to the original design of MIME, true.
Also, removed the %p alias for the %l escape.
markus schnalke [Sat, 14 Apr 2012 15:35:18 +0000 (17:35 +0200)]
No more mhshow-charset-* but instead automatic invocation of iconv(1).
Unless there is an mhshow-show-* rule, text/plain content types are
automatically piped through iconv(1) if their charset is foreign.
For mhshow-show-* rules, there's a new %c escape, which expands to the
foreign charset. The contents of the files, referenced by %f/%F are still
in foreign encoding. One might want to use `iconv -f %c %f | mycommand'
for custom mhshow-show-* rules.
We depend on iconv(1) now! But this may change to dependence on iconv(3),
soon.
This field is inconsistent and not at all finished, yet.
markus schnalke [Thu, 12 Apr 2012 21:05:47 +0000 (23:05 +0200)]
mhshow/mhstore: Removed support for retrieving message/external-body parts.
These tools won't download the contents automatically anymore. Instead,
they print the information needed to get the contents. If someone should
really receive one of those rare message/external-body messages, he can
do the job manually. We save nearly a thousand lines of code. That's worth
it!
(The profile entry `nmh-access-ftp' and sbr/ruserpass.c for reading
~/.netrc are gone now.)
markus schnalke [Thu, 12 Apr 2012 16:28:49 +0000 (18:28 +0200)]
mhbuild: Removed support for creating message/external-body parts.
Although I really like the concept, I remove the support because I haven't
seen any such message in my life. Less code through removing hardly used
features is more appealing to me than having support for such nice but
hardly used features. The world took a different road than the one MIME
proposed.
markus schnalke [Thu, 12 Apr 2012 15:30:56 +0000 (17:30 +0200)]
mhstore -auto: Never store into subdirs, but use basename of filename.
Now, the only remaining problem with -auto is overwriting of existing files.
But actually that's no problem of -auto, because the behavior is the same
with -noauto.
markus schnalke [Thu, 12 Apr 2012 14:12:43 +0000 (16:12 +0200)]
mhstore: Made -auto the default.
Now, that tar files are not extracted automatically anymore,
it's quite safe to have -auto, as nothing unexpected will happen.
Still, existing files will be overwritten, but that's the case
with -noauto too.
markus schnalke [Thu, 12 Apr 2012 13:18:12 +0000 (15:18 +0200)]
Don't treat application/octet-stream with type=tar special.
Don't auto-extract such parts with `mhstore -auto'. This makes -auto
less a security problem.
The auto-extract feature of mhshow that had been described in its man
page seems to not exist, anyway.
markus schnalke [Wed, 11 Apr 2012 15:23:59 +0000 (17:23 +0200)]
Remove caching of external MIME parts.
I.e. -rcache/-wcache switches and nmh-cache/nmh-private-cache profile entries.
External MIME parts are *very* rare nowadays, who cares about caching
them, anyway?