Philipp Takacs [Sun, 2 Apr 2017 21:15:19 +0000 (23:15 +0200)]
complete rewrite of pick
this make the code cleaner and removes the
regex implementation. The mail itself is now read
by pick and the match functions only check if the
field match.
markus schnalke [Mon, 17 Apr 2017 17:35:21 +0000 (19:35 +0200)]
Fix mhsign for gpg2: Expiry date format
Gnupg2 uses --fixed-list-mode by default for --with-colons.
Gnupg1 needs this option explicitly to generate the same output
format (timestamps) for expiry dates.
markus schnalke [Tue, 6 Sep 2016 17:53:20 +0000 (19:53 +0200)]
Add %(unmailto) format function for List-Post headers
With the unmailto format function it is possible to extract
the address from a List-Post header, which e.g. is:
List-Post: <mailto:mmh@marmaro.de>
Applying %(unmailto{list-post}) extracts: ``mmh@marmaro.de'',
which then can be used as recipient address for list replies.
A format file (to be used with ``repl -form repllistcomps'')
is included.
markus schnalke [Tue, 6 Sep 2016 05:58:17 +0000 (07:58 +0200)]
Generate the command list in mmh-intro(7)
This implementation does handle the aliases of folder(1) and
flist(1), but not the ones of show(1) and new(1). Hence the
commands next(1), prev(1), fnext(1), fprev(1) and unseen(1)
don't appear on the list.
Adjusted some of the short descriptions based on the version
in the manual command list.
markus schnalke [Mon, 5 Sep 2016 09:51:00 +0000 (11:51 +0200)]
Make mhstore(1) use "filename" attr of Content-Disposition
Before, only the "name" attr of Content-Type was used as the filename
to store attachments. The "filename" attr of Content-Disposition
(which is the much more appropriate value) was ignored, thus often
resulting in the attachment being stored with a default name like
20.2.pdf, for instance.
Dmitry Bogatov [Fri, 26 Aug 2016 23:03:28 +0000 (02:03 +0300)]
Fix out-of-bounds error when incorporating email from stdin
Before this patch, if +inbox is empty, following error happened:
$ inc -file - < /dev/null
Incorporating new mail into inbox...
inc: no messages incorporated, continuing...
inc: Bug: message out of bounds
This happened due improper call to `seq_setunseen', which implicitly
assumed that there is at least one message (it does not handle case
where both mp->hghmsg and mh->lowmsg are 0).
Bug does not happens with command `inc -file empty', since file
is checked for being empty before any read attempts.
Philipp Takacs [Sun, 14 Aug 2016 22:11:39 +0000 (00:11 +0200)]
fix whatnow2 send
in the last commit whatnow2 send was changed
to keep the metafile. This don't work with the
``exec send''. Now the send() is renamed to
sendfunktion and the ``exec'' is removed.
Add "delete" to "delete" pattern in whatnow2's case construct
The attached patch modifies whatnow2 so that calling `whatnow2 delete`
works as may be expected. Without this change, the "delete" function
in whatnow2 was called only when whatnow2 was executed as one of the
following.
Philipp Takacs [Fri, 12 Aug 2016 15:43:05 +0000 (17:43 +0200)]
fix bug in decode_rfc2047()
If iconv() returns an error and the source encoding
is utf-8, the character jump has an of by one: the
source string is incresed by one possition more the
the length is decreased.
Philipp Takacs [Thu, 11 Aug 2016 15:22:49 +0000 (17:22 +0200)]
fix dist
Because of always mimeify the dist hasn't work anymore.
This is fixed by skipping attach() and signandenc(), if
it's handled as a redistribution message.
markus schnalke [Fri, 5 Aug 2016 19:46:55 +0000 (21:46 +0200)]
send: Always MIMEify and pass already MIMIfied drafts through
Even if technically not necessary, MIMEify the draft. This simplifies
the code at hardly any cost.
To still be able to create arbitrary complex MIME structures, make
send(1) pass already MIMEified drafts through, without automatically
invoking mhbuild(1) on them a second time (which would fail). This
way, you can manually invoke mhbuild(1) and afterward call send(1)
... and everything will work just as expected.
Also documented this in the man page, and additionally added a
paragraph about the signing and encrypting feature of send(1), which
wasn't documented yet.
markus schnalke [Fri, 29 Jul 2016 09:42:59 +0000 (11:42 +0200)]
mhsign/mhpgp: Clarify the manpages and usage lines
These tools are shell scripts and thus have a different option
processing mechanism than the other mmh tools. Unfortunately, it
is limited: Options must come first.
Also note that mhpgp accepts a +folder argument, and what the
defaults are.
Philipp Takacs [Wed, 16 Mar 2016 02:06:03 +0000 (03:06 +0100)]
fork in repl as a tree
This fix the bug in the last improvement (pipe mail through show).
In the first patch repl only waits for one child, now the tree causes
that both childs finished befor repl continues.
markus schnalke [Fri, 22 Apr 2016 10:46:33 +0000 (12:46 +0200)]
mhsign: Fix key lookup of aliases when encrypting
Now mhsign can handle addresses that contain whitespace (e.g.
``markus schnalke <meillo@marmaro.de>'') in aliases. The helper
tool ap(1) is used to extract the actual addresses.
markus schnalke [Thu, 21 Apr 2016 14:43:25 +0000 (16:43 +0200)]
refile: Never change the current folder
Refile is different to all other tools, as its +folder arguments
are destination folders, not source folders (it even supports
multiple of them). A source folder can be specified with -src.
Refile used to change the current folder to the source folder.
It does not do so anymore.
Most often the current folder is used as the source folder; this is
the default. Hence changing the current folder is a no-op. But if
one refiles from some other source folder, changing to that folder
is seldom useful. Consider the scenario where one wants to collect
the last messages of a set of folders in some other folder. The
old behavior required to know where you are to collect the messages,
because after the first refile you'd be somewhere else:
for i in one two three ; do
refile -src +$i l +lastmsgs
done
# now we are in +three, hence go back where we were
folder +lastmsgs
The new behavior allows to move the messages just here (@), no
matter where that is:
for i in one two three ; do
refile -src +one l @
done
# now we still are where we were
Refiling actions do no more affect the current folder, hence one
may securely refile with different -src +folder many times in one
row, without having to care for changing locations.
markus schnalke [Wed, 20 Apr 2016 07:02:06 +0000 (09:02 +0200)]
Fix order of (trim) and (decode) in repl*comps
Before MH had (decode), the format escapes used to be:
%(void{comp})%(trim)%(putstr)
i.e. set the internal str register to the component text, trim
trailing whitespace from it, then print the value. Later (putstr)
was simply replaced by (decode), which first RFC-2047 decodes the
string and then prints it (if it is the outermost function). That
almost always produced the correct result. But this way the
whitespace trimming is done at the wrong point. Correct is to first
decode the string and then trim it. tests/scan/test-mh-format
checks for that.
markus schnalke [Wed, 20 Apr 2016 06:54:20 +0000 (08:54 +0200)]
Trim trailing whitespace in scan and show
This commit fixes the most common scan listings. Still trailing
whitespace will be generated by legacy scan listings.
The formatfield workaround in etc/mhl.headers is a bit clumsy.
Maybe, an mhl variable should be defined for this case ... or
better not, to keep the mh-format and the mhl functions orthogonal.
markus schnalke [Wed, 20 Apr 2016 06:19:24 +0000 (08:19 +0200)]
Make default scan/inc listing file-based
There's now a new format file etc/scan.default, which contains
the default scan listing. Previously it was hard-coded as a define
in h/scansbr.h. The default scan listing format can be set in
config/config.h and can be queried with `mhparam scanformat'.
markus schnalke [Tue, 19 Apr 2016 14:15:10 +0000 (16:15 +0200)]
Cleanup manpage mh-format(5)
- More suitable scan listing examples
- Adjust paths
- There are no ``local mh experts'' anymore in the mmh world
- Add overview on the escape types
- %(decode) does print str as well
- Decode Subject header in the example
- Further minor stuff