Dmitry Bogatov [Thu, 14 Jul 2016 22:39:37 +0000 (01:39 +0300)]
simplify whatnow.c/main() function
GNU Complexity: 60 -> 59.
Philipp Takacs [Sun, 8 May 2016 16:40:51 +0000 (18:40 +0200)]
use old error message
Philipp Takacs [Sun, 8 May 2016 16:21:34 +0000 (18:21 +0200)]
don't warn if lenerr is ignored
Philipp Takacs [Mon, 25 Apr 2016 14:19:54 +0000 (16:19 +0200)]
better error handling
only warn for LENERR2, or ignore it in some cases
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.
Philipp Takacs [Sun, 24 Apr 2016 12:19:05 +0000 (14:19 +0200)]
fix
2fb1dd2271e5be9d0b0c9cbd4e7d6d5d51aaecb9
Do a length check in the header, but not in the body.
Philipp Takacs [Sun, 24 Apr 2016 10:39:30 +0000 (12:39 +0200)]
fixup for
2a903a43ad7d26f5581d4ad1bbc077f8ecc5f5a9
a spell error hapend in uip/spost.c: state not status
Philipp Takacs [Sun, 24 Apr 2016 10:29:32 +0000 (12:29 +0200)]
check for to long lines and ioerror in spost
Now spost stop and exit if some error happend. Befor this
spost stoped on an error in the body and submitted a half
mail.
Philipp Takacs [Sat, 23 Apr 2016 18:50:43 +0000 (20:50 +0200)]
check for linecap and trailing space in mhbuild for text/plain
without this a mail with too long lines can be created, or
trailing space is removed by mhsign.
Philipp Takacs [Sat, 23 Apr 2016 18:48:45 +0000 (20:48 +0200)]
ignore LENERR2 in seq_read()
this is unnecessary and brings problems because
sequences aren't created with a linecap.
Philipp Takacs [Sat, 23 Apr 2016 18:46:20 +0000 (20:46 +0200)]
adjust handling of too long lines in m_getfld2
Now a field is complete read, if a line is to long.
Also no length check is done in the body, because
the caller can check f.valuelength.
markus schnalke [Sun, 24 Apr 2016 08:59:10 +0000 (10:59 +0200)]
Philipp Takacs [Fri, 22 Apr 2016 22:56:56 +0000 (00:56 +0200)]
Merge branch 'm_getfld2-meillo' into master
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 [Thu, 21 Apr 2016 14:03:23 +0000 (16:03 +0200)]
refile: Fix an error message; always use braces; add/remove comments
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
markus schnalke [Mon, 18 Apr 2016 07:13:15 +0000 (09:13 +0200)]
Enable addr decoding in replcomps and replgroupcomps
markus schnalke [Mon, 18 Apr 2016 06:47:17 +0000 (08:47 +0200)]
Tests: mmh currently generates a part line, so expect it
Dmitry Bogatov [Wed, 13 Apr 2016 18:36:29 +0000 (21:36 +0300)]
Fix spelling and encoding errors in manpages and an error message
Jan Düpmeier [Wed, 13 Apr 2016 16:22:37 +0000 (18:22 +0200)]
test also libtinfo for modf
Some Gentoo instalations has this instand of ncurses
m@mmmmarascio.xyz [Mon, 4 Apr 2016 04:33:34 +0000 (21:33 -0700)]
Replace getcpy() and strdup() with mh_xstrdup()
this harmonise the code.
Also fix some bugs, if return value of strdup is not checked.
Philipp Takacs [Sun, 31 Jan 2016 18:47:23 +0000 (19:47 +0100)]
simple mbox support for rcvstore
Some MTA(opensmtpd) add a ``From '' line ad the head of
mails befor handling the mail to a .forwoad MDA. m_getfld2
don't support such mails, so rcvstore should handle this
mbox-like mails.
m@mmmmarascio.xyz [Tue, 22 Mar 2016 03:28:44 +0000 (20:28 -0700)]
Replace free() with mh_free0()
mh_free0() free's the memmory and set's the pointer to NULL after
the free. This avoids doublefree and dereferenc of a non valid poiter.
m@mmmmarascio.xyz [Thu, 17 Mar 2016 15:16:26 +0000 (08:16 -0700)]
remove unnecessary casts
These casts after malloc just make the code harder to read
m@mmmmarascio.xyz [Mon, 14 Mar 2016 16:29:35 +0000 (09:29 -0700)]
Replace mh_xmalloc() with mh_xcalloc()
calloc() is safer, because it initialize the memory to zero.
m@mmmmarascio.xyz [Sun, 13 Mar 2016 15:49:35 +0000 (08:49 -0700)]
Call context_read() before getting filter in repl
The manual page of repl says "[i]f a file named `mhl.reply' exists in the
user's mmh directory, it will be used instead of [the default form file]".
Now this behavior is implement.
Philipp Takacs [Sat, 27 Feb 2016 14:45:26 +0000 (15:45 +0100)]
check return value of m_getfld2 befor using the field
this bug causes a segfault, because the field.value is a
nullptr if FILEEOF2 is returned.
Philipp Takacs [Sun, 17 Jan 2016 13:19:11 +0000 (14:19 +0100)]
pipe mail throu show on repl
now repl works as expected for MIME-messages
m@mmmmarascio.xyz [Thu, 14 Jan 2016 21:41:26 +0000 (14:41 -0700)]
Add existing "From:" to Bcc-ed messages.
If you use multible mailboxes, the correct one is
now used for Bcc-messages.
Philipp Takacs [Thu, 7 Jan 2016 13:23:34 +0000 (14:23 +0100)]
fix profile path in mhl(1)
m@mmmmarascio.xyz [Tue, 5 Jan 2016 02:47:00 +0000 (19:47 -0700)]
Change some "nmh" into "mmh" in man pages
This is to avoid confusion between nmh and mmh
Philipp Takacs [Sun, 13 Dec 2015 16:20:33 +0000 (17:20 +0100)]
Use boolean instand of bool
Philipp Takacs [Sun, 13 Dec 2015 16:14:38 +0000 (17:14 +0100)]
Revert "add free_field as standard for struct field"
This is not necesary, because the compieler have to take care
about NULL != (void*)0
This reverts commit
a87df3543d3bc128ba4079d1f95638476ba5ca50.
Philipp Takacs [Fri, 27 Nov 2015 10:59:03 +0000 (11:59 +0100)]
fix lengthcheck in m_getfld2()
The lenght check akcepted to big field names
Philipp Takacs [Fri, 27 Nov 2015 10:54:24 +0000 (11:54 +0100)]
fix segfault in prompter
This was necesary because m_getfld2() clears now f.value
if FILEEOF2 is reached
Philipp Takacs [Thu, 26 Nov 2015 22:24:18 +0000 (23:24 +0100)]
add free_field as standard for struct field
this is a easy way to initializ a struct field. ``{{0}}''
can lead to bugs, because NULL is not necesary ``((void *)0)''
Philipp Takacs [Thu, 26 Nov 2015 22:07:12 +0000 (23:07 +0100)]
m_getfld2 is more tranceparent on error
now all read content of the file is given to the caller,
so he can possible fix this error.
Philipp Takacs [Sat, 21 Nov 2015 11:20:36 +0000 (12:20 +0100)]
make m_getfld2() aware of CRLF lineendings
Philipp Takacs [Sat, 21 Nov 2015 11:16:01 +0000 (12:16 +0100)]
make m_getfld2() called with an error state a noop
This probduce some code dublication, but the will be
reduced, if we make m_getfld2() more transparent on errors.
markus schnalke [Thu, 12 Nov 2015 20:48:32 +0000 (21:48 +0100)]
Finally we get rid of the unmaintainable m_getfld()!
m_getfld() was about 700 lines, 300 of them being comments -- that's 42%!
m_getfld2() is 240 lines, 30 of them being comments. That's only half as
much code. Most important, however, is that this code is understandable
and thus maintainable. We escaped the dead end of the heavily optimized
m_getfld() be re-writing it from scratch. (Thanks to Philipp Tacaks!)
m_getfld2() is line-based and not character-based like m_getfld(). This
change spared us to keep digging into stdio internals or implementing
our own I/O buffering. We are now portable to any standard-conforming
stdio implementation.
markus schnalke [Thu, 12 Nov 2015 19:58:03 +0000 (20:58 +0100)]
Adjust tests to m_getfld2() and write some more
m_getfld2() is more strict than m_getfld() and does less guessing.
markus schnalke [Thu, 12 Nov 2015 19:12:02 +0000 (20:12 +0100)]
Only lines consisting of nothing but dashes are body separators
This is how the documentation specifies it, see mh-mail(5). The old
m_getfld(), however, was more relaxed and treated any header line that
starts with a dash as the body separator. We are more strict here,
because ``-foo: bar'' is a valid header line (according to RFC 2822),
that should thus not be treated as the body separator, whereas a line
``------'' in the header could only be a format error if we don't
take it as the body separator.
markus schnalke [Thu, 12 Nov 2015 16:52:22 +0000 (17:52 +0100)]
Convert inc and scan from m_getfld() to m_getfld2()
The main conversion was done in uip/scansbr.c.
Mbox handling is now completely outside of m_getfld2(), which does not
even know about From_ lines.
No more need to call thisisanmbox() (formerly m_unknown(), ``the magic
invocation'') before calling scan().
The newly introduced gotos should be eliminated ...
markus schnalke [Thu, 12 Nov 2015 16:05:53 +0000 (17:05 +0100)]
Convert rcvdist and repl from m_getfld() to m_getfld2()
markus schnalke [Thu, 12 Nov 2015 16:03:36 +0000 (17:03 +0100)]
m_getfld2: Return line for LENERR2, plus some documentation
markus schnalke [Thu, 12 Nov 2015 07:23:04 +0000 (08:23 +0100)]
m_getfld2: ERR2 means a read error, thus name it IOERR2
markus schnalke [Thu, 12 Nov 2015 07:14:59 +0000 (08:14 +0100)]
m_getfld2: Whitespace in component name is forbidden
Also on style: No function calls should be used to initialize
variables in definition statements. Use separate assignments in
this case.
markus schnalke [Wed, 11 Nov 2015 06:31:00 +0000 (07:31 +0100)]
Use continue instead of one long if for the whole loop body
Plus remove unnecessary comments. This improves the signal-noise ratio.
The identifiers are already telling us enough.
markus schnalke [Tue, 10 Nov 2015 19:58:31 +0000 (20:58 +0100)]
Return invalid line for FMTERR in m_getfld2()
This is necessary for mbox handling outside of m_getfld2().
markus schnalke [Tue, 10 Nov 2015 05:53:44 +0000 (06:53 +0100)]
No error-checking for error-checking alloc functions
The mh_x(m|c|re)alloc function always return successful
... or terminate the program on their own, otherwise.
Philipp Takacs [Fri, 6 Nov 2015 10:30:51 +0000 (11:30 +0100)]
check for (un)selection befor (un)set
If you select or unselect the same msgnum
numsel won't be increased/decreased twice.
Philipp Takacs [Thu, 5 Nov 2015 21:48:34 +0000 (22:48 +0100)]
handle hghsel lowsel and numsel in (un)set_selected
Now you can use this funkitions without taking care
of this values.
Thanks c_14 for reporting this bug.
markus schnalke [Tue, 10 Nov 2015 05:53:44 +0000 (06:53 +0100)]
No error-checking for error-checking alloc functions
The mh_x(m|c|re)alloc function always return successful
... or terminate the program on their own, otherwise.
markus schnalke [Mon, 9 Nov 2015 18:17:09 +0000 (19:17 +0100)]
Fix minor typo in man page
markus schnalke [Mon, 9 Nov 2015 21:08:51 +0000 (22:08 +0100)]
Adjust the tests to less tolerant m_getfld2()
We require the header and body to be separated by an empty line.
We require header lines to end with a newline. m_getfld2() does
not try to guess as much as the old m_getfld() did.
markus schnalke [Mon, 9 Nov 2015 21:07:54 +0000 (22:07 +0100)]
Convert most of the tools from m_getfld() to m_getfld2()
markus schnalke [Mon, 9 Nov 2015 21:03:40 +0000 (22:03 +0100)]
Add new implementation m_getfld2()
This is mainly Philipp Takacs work.
markus schnalke [Mon, 9 Nov 2015 18:17:09 +0000 (19:17 +0100)]
Fix minor typo in man page
Philipp Takacs [Fri, 6 Nov 2015 10:30:51 +0000 (11:30 +0100)]
check for (un)selection befor (un)set
If you select or unselect the same msgnum
numsel won't be increased/decreased twice.
Philipp Takacs [Thu, 5 Nov 2015 21:48:34 +0000 (22:48 +0100)]
handle hghsel lowsel and numsel in (un)set_selected
Now you can use this funkitions without taking care
of this values.
Thanks c_14 for reporting this bug.
markus schnalke [Wed, 4 Nov 2015 16:31:50 +0000 (17:31 +0100)]
Better description of the Sender header in man page
Plus wording improvements and other minor stuff.
markus schnalke [Tue, 3 Nov 2015 07:47:26 +0000 (08:47 +0100)]
Re-add --with-lockdir=DIR configure option
At the same time eliminate acconfig.h (and thus the autoreconf
warning).
Include the lock dir string only if we use dot locking.
markus schnalke [Tue, 3 Nov 2015 07:37:57 +0000 (08:37 +0100)]
More sensible check for 7bit ASCII
Always true condition reported by -Wextra -pendatic.
markus schnalke [Tue, 3 Nov 2015 07:36:45 +0000 (08:36 +0100)]
Remove unused parameter
Reported by -Wextra -pedantic.
markus schnalke [Tue, 3 Nov 2015 09:57:07 +0000 (10:57 +0100)]
Remove dead code: FLDEOF and BODYEOF are never set
markus schnalke [Mon, 2 Nov 2015 16:51:32 +0000 (17:51 +0100)]
Bump version number
markus schnalke [Mon, 2 Nov 2015 16:38:44 +0000 (17:38 +0100)]
This is mmh-0.2
markus schnalke [Mon, 2 Nov 2015 16:37:13 +0000 (17:37 +0100)]
Decode address headers in replcomps
markus schnalke [Mon, 2 Nov 2015 16:17:40 +0000 (17:17 +0100)]
Update README and release howto to new NEWS file
Also reorder the release steps to first check the tarball and
then tag it as final.
markus schnalke [Mon, 2 Nov 2015 16:06:32 +0000 (17:06 +0100)]
Add NEWS file, which summarizes changes per release
markus schnalke [Mon, 2 Nov 2015 07:16:10 +0000 (08:16 +0100)]
Include a static copy of the CVS log in the dist tarball
Philipp Takacs [Sun, 1 Nov 2015 21:35:29 +0000 (22:35 +0100)]
Teach spost to handle address groups
Plus more tests for address groups.
Philipp Takacs [Fri, 30 Oct 2015 20:41:31 +0000 (21:41 +0100)]
test Group Addresses in spost
Philipp Takacs [Sat, 31 Oct 2015 15:40:20 +0000 (16:40 +0100)]
catch unparsable addresses
Now spost don't coredump if an address can't be parsed
Philipp Takacs [Sat, 31 Oct 2015 15:39:40 +0000 (16:39 +0100)]
test if spost catch bad addresses
Philipp Takacs [Sat, 31 Oct 2015 14:52:31 +0000 (15:52 +0100)]
test if aliasing work in spost
markus schnalke [Wed, 28 Oct 2015 22:43:02 +0000 (23:43 +0100)]
Fix configure.ac warning
markus schnalke [Wed, 28 Oct 2015 22:39:50 +0000 (23:39 +0100)]
Remove check for not used networking libraries in configure.ac
Mmh does no more contain networking code, hence we don't need this.
This way, we can also get rid of aclocal.m4.
markus schnalke [Wed, 28 Oct 2015 22:19:14 +0000 (23:19 +0100)]
Build the release tarball from git, not manually
Previously the Makefiles contained lists of files to distribute.
They built the release tarball manually. It's much easier to just
use git, which knows which files are the relevant files, because
it's the ones that are under version control. We just need to
add some additional, pre-generated files for convenience, so that
the user does not need to have auto* and lex installed.
The release tarball is now fully assembled in the top-level
Makefile. (The only tricky part is sbr/dtimep.c, because that
needs to be generated in the subdirectory.)
markus schnalke [Wed, 28 Oct 2015 18:02:13 +0000 (19:02 +0100)]
Merge
markus schnalke [Wed, 28 Oct 2015 16:50:24 +0000 (17:50 +0100)]
Include `test' dir in release tarball
The subdirectories `docs' and `test' are managed by the top-level
Makefile now, because there's nothing to do in them but to copy
them for the distribution tarball. (This way, we also don't have
to include each new file in these directories to the file list in
Makefile.in.)
markus schnalke [Wed, 28 Oct 2015 16:15:42 +0000 (17:15 +0100)]
Update lists of files to distribute
Also partly reordered the lists.
Philipp Takacs [Wed, 28 Oct 2015 11:19:05 +0000 (12:19 +0100)]
initialize mp in ismymbox
markus schnalke [Wed, 28 Oct 2015 06:55:10 +0000 (07:55 +0100)]
Drop the SYNOPSIS section from some man pages
For some man pages this section makes few sense.
Plus some minor formating stuff on the way ...
markus schnalke [Wed, 28 Oct 2015 06:47:15 +0000 (07:47 +0100)]
Minor clarification in mh-alias(5)
markus schnalke [Wed, 28 Oct 2015 05:59:03 +0000 (06:59 +0100)]
Silence the output of `cd -' in the tests
markus schnalke [Tue, 27 Oct 2015 22:11:51 +0000 (23:11 +0100)]
Use cksum(1) instead of md5sum(1) in the tests
cksum(1) is part of POSIX; md5sum(1) is not.
markus schnalke [Tue, 27 Oct 2015 21:30:30 +0000 (22:30 +0100)]
Run the tests in defined (i.e. sorted) order
markus schnalke [Tue, 27 Oct 2015 21:20:28 +0000 (22:20 +0100)]
Merge
Philipp Takacs [Sun, 25 Oct 2015 19:57:23 +0000 (20:57 +0100)]
consider Default-From as own address
markus schnalke [Tue, 27 Oct 2015 06:50:33 +0000 (07:50 +0100)]
Remove outcommented code (C99 comment)
Our code should be clean C89 (ANSI C). There's no reason to
keep this C99 comment.
markus schnalke [Tue, 27 Oct 2015 06:43:58 +0000 (07:43 +0100)]
Ensure $SHELL is set for the tests
Non-interactive shells might not set it (this is true for dash
and mksh, at least). Currently we use $SHELL in whatnow(1).
Although we likely remove this use, it's rather worthwhile to
have $SHELL available in the test scripts.
markus schnalke [Tue, 27 Oct 2015 06:30:14 +0000 (07:30 +0100)]
Update mmh-intro(7) man page
markus schnalke [Tue, 27 Oct 2015 06:29:34 +0000 (07:29 +0100)]
Remove mh-tailor(5) man page
markus schnalke [Tue, 27 Oct 2015 06:17:09 +0000 (07:17 +0100)]
Split the releasing instructions into own document
This makes them better visible.
markus schnalke [Tue, 27 Oct 2015 06:16:00 +0000 (07:16 +0100)]
Updates README, INSTALL, and docs/MACHINES