markus schnalke [Fri, 23 Mar 2012 11:20:01 +0000 (12:20 +0100)]
Fixed building in a separate build directory.
Like this:
mkdir /tmp/foo
cd /tmp/foo
/path/to/sources/configure -q
make
If you want to know more, search for VPATH.
markus schnalke [Fri, 23 Mar 2012 08:43:17 +0000 (09:43 +0100)]
makedir(): Removed the strange RUID!=EUID code and the access(2) call.
Dan couldn't find a reason for the code neither, hence I assume it's save
to simply remove it.
Ummm, why do we want to avoid creating directories
with the effective user ID? None of the nmh tools are
installed such that the effective should be different
from the real, and if some parent process made the two
be different, I don't see why it should be our job to
enforce the real UID. Also, why the heck do we call
the mkdir executable rather than the library function in
this case?? If we do want to call the mkdir executable,
we should at least be giving it -p (and change the single
chmod() call below) so it can successfully create nested
directories like the above code can.
-- Dan Harkless <dan-nmh@dilvish.speed.net>
Concerning access(2): We should better always just try the action instead
of first asking if we are allowed to do it.
markus schnalke [Thu, 22 Mar 2012 20:27:53 +0000 (21:27 +0100)]
scansbr: Removed the ``performance hack'' for inc as it wasn't faster.
I tested a 150MB/500msgs mbox but couldn't see any time differences. In both
cases it took 2-5s on my machine. Hence, I go for the much simpler and not
``we use strange internals'' version. If you really inc much larger mboxes,
then just take some time. ;-)
The explaining comment for the hack had been:
Performance hack: some people like to run "inc" on things like
net.sources or large digests. We do a copy directly into the output
buffer rather than going through an intermediate buffer.
We need the amount of data m_getfld found & don't want to do a
strlen on the long buffer so there's a hack in m_getfld to save the
amount of data it returned in the global "msg_count".
markus schnalke [Thu, 22 Mar 2012 20:07:50 +0000 (21:07 +0100)]
scansbr: Fixed scan and inc.
Writing to /dev/null had it's sense, as for scanning mboxes, the message size
had been determined this way and the file pointer had been pushed forward.
This is now done using the input file pointer instead of the output fp.
markus schnalke [Thu, 22 Mar 2012 17:50:10 +0000 (18:50 +0100)]
scansbr: Only write to file if we're incing, but not when scanning.
If the original author would have used logical flags instead of magic
values in `outnum', the code wouldn't have been broken all the time.
Writing to /dev/null instead of not writing at all ... oh my! :-/
markus schnalke [Thu, 22 Mar 2012 16:46:06 +0000 (17:46 +0100)]
Removed the DBMPWD (aka. DBM) define. It was per default enabled, anyway.
The explanation of this option is:
For sites with a dbm-style password file (such as with Yellow Pages),
MH will not read the entire passwd file into a cache. At one site
that runs YP on a large passwd file, using this showed a 6:1 performance
improvement.
I don't like performance optimization, but if the non-cached version is
faster, then we surely take that one.
markus schnalke [Thu, 22 Mar 2012 12:57:24 +0000 (13:57 +0100)]
Removed remaining absolute mmh program path names from the binaries.
The mmh bindir must to be in PATH, but we are able to move the programs now.
The etcdir is still compiled into the binaries.
markus schnalke [Thu, 22 Mar 2012 10:46:47 +0000 (11:46 +0100)]
mhmail: Don't invoke inc when called without arguments.
We can't provide a full mailx-replacement anyways. By magically invoking
inc(1), we likely confuse the user. Instead tell him that he can invoke
inc(1) himself. This doesn't mess with the important property: mhmail is
a mailx replacement for scripts to send mail.
markus schnalke [Thu, 22 Mar 2012 09:52:49 +0000 (10:52 +0100)]
Rework of Editor/defaulteditor, similar to Pager/defaultpager; new env vars.
The priority order is: MMHEDITOR (env) > Editor (profile) > VISUAL (env)
EDITOR (env) > vi
markus schnalke [Thu, 22 Mar 2012 09:18:23 +0000 (10:18 +0100)]
moreproc is now Pager/defaultpager; removed -moreproc flags; added env vars.
The priority order is: MMHPAGER (env) > Pager (profile) > PAGER (env) > more
markus schnalke [Thu, 22 Mar 2012 07:49:57 +0000 (08:49 +0100)]
slocal: Don't remove $PATH from env. Now execvp() searches as expected.
Stripping the environment may rather keep the user from doing sensible
things than it increases the security. Maybe we shouldn't strip it at all.
markus schnalke [Wed, 21 Mar 2012 15:25:08 +0000 (16:25 +0100)]
Made DUMB the default and removed the the #ifdefs.
DUMB had been the default and forces MH to use a full RFC 822 address
parser instead of guessing on addresses.
markus schnalke [Tue, 20 Mar 2012 17:02:32 +0000 (18:02 +0100)]
scan(): Replaced explicit noisy parameter with implicit nfs check.
nfs is the ``new format string'' if it is NULL, we don't (and actually
can't) print a scan line.
markus schnalke [Mon, 13 Feb 2012 12:51:53 +0000 (13:51 +0100)]
Now, spost should be quite usable.
Make use of m_mktemp2(), like elsewhere in the mmh code base.
Various rework of the Bcc handling code.
Still to do:
- Fcc handling needs improvements.
- Draft files for Bcc recipients are left existing in /tmp.
markus schnalke [Sun, 12 Feb 2012 16:49:57 +0000 (17:49 +0100)]
Various rework in spost.
- Removed some unused flags.
- Don't care for multiple Subject: headers. They aren't allowed.
- Correctly handle headers that are folded before the first word of the value.
- Outsourced code from putfmt() into new process_fcc().
markus schnalke [Sun, 12 Feb 2012 15:45:26 +0000 (16:45 +0100)]
Changed the Fcc handling code in spost.
Both, the new as well as the old approach have their limitations. I'm far
from confident with the new approach. At least it's simpler. It should be
good enough for now.
markus schnalke [Sun, 12 Feb 2012 11:31:01 +0000 (12:31 +0100)]
Temporary state of spost rework: Things should work if you don't use Bcc: hdrs.
The simple changes: Removed -[no]filter and did some minor refactoring.
The complex changes: First steps in reworking the Bcc-related code.
Don't use Bcc: headers with this state of code. They simply are ignored.
markus schnalke [Sat, 11 Feb 2012 19:18:43 +0000 (20:18 +0100)]
Made show(1) the default lproc. `list' and `display' changed a bit.
Already in 1984, MTR stated, that lproc should be show. I agree with him
on this point, but I strongly disagree there: ``if lproc is "mhl", use
mhlproc for consistency''. I thus removed this part and even more around it.
The code became simpler but additional arguments to `list' and `display'
are not recognized anymore. That won't be much inconvenience.