Philipp Takacs [Sun, 25 Oct 2015 13:36:51 +0000 (14:36 +0100)]
add mailsync description
Philipp Takacs [Sun, 25 Oct 2015 13:21:55 +0000 (14:21 +0100)]
remove TODOs for not supportet programms
markus schnalke [Sun, 25 Oct 2015 20:34:20 +0000 (21:34 +0100)]
send: MIMEify with non-ascii header and ascii body!
This code is not perfect, as it scans body lines twice. We might
want to rework it someday. But, ignoring the minor performance
issue, it ensures, that we MIMEify in the case when some headers
contain non-ASCII text but the body does not.
Philipp Takacs [Sun, 25 Oct 2015 20:27:58 +0000 (21:27 +0100)]
remove variable mp2 from spost in putadr
This variable is set but not used. Thanks gcc for the warning.
markus schnalke [Sun, 25 Oct 2015 19:42:52 +0000 (20:42 +0100)]
Add DCC support into whom
Plus a test for it.
markus schnalke [Sun, 25 Oct 2015 19:02:33 +0000 (20:02 +0100)]
Merge
markus schnalke [Sun, 25 Oct 2015 19:00:50 +0000 (20:00 +0100)]
DCC contains invisible (not visible) recipients
Added new test for BCC and DCC headers, which discovered the bug.
Philipp Takacs [Sun, 25 Oct 2015 12:45:42 +0000 (13:45 +0100)]
add config.o and version.o to libmh.a
Now you can easy link against libmh.a with -lmh
markus schnalke [Sun, 25 Oct 2015 18:38:33 +0000 (19:38 +0100)]
Add test for sender header in spost
(Fails currently, because default-from is not part of alternate-mailboxes.)
markus schnalke [Sun, 25 Oct 2015 17:54:23 +0000 (18:54 +0100)]
Adjust coding style from nmh to mmh
Philipp Takacs [Sun, 25 Oct 2015 16:25:16 +0000 (17:25 +0100)]
fix the prompter test
Philipp Takacs [Sat, 24 Oct 2015 10:16:58 +0000 (12:16 +0200)]
set psigint befor the setjmp in prompter
this mutes a Compielerwarning.
markus schnalke [Fri, 23 Oct 2015 13:30:10 +0000 (15:30 +0200)]
Rework in the test framework; updated and new tests
Many tests were ported from nmh.
Two tests fail at the moment:
- tests/ali/test-ali: needs porting the bugfix from nmh
- tests/prompter/test-prompter: needs further investigation
markus schnalke [Fri, 23 Oct 2015 12:26:49 +0000 (14:26 +0200)]
Merge branch 'master'
Eric Schnoebelen [Fri, 31 Aug 2012 13:49:37 +0000 (09:49 -0400)]
Move chdir() call so -recurse option works again
This commit is ported from nmh.
markus schnalke [Fri, 23 Oct 2015 07:52:55 +0000 (09:52 +0200)]
Fix off-by-one error (CPERLIN)
CPERLIN is the chars per line without the line break chars (\r\n),
at least would that match the description in RFC 2822. Actually,
however, the max SHOULD line length (excluding line break chars)
is 78 according to the RFC. Therefore it seems as if we should
set CPERLIN to 78. (This is open to decide and to do.)
markus schnalke [Wed, 21 Oct 2015 15:39:15 +0000 (17:39 +0200)]
Merge
markus schnalke [Wed, 21 Oct 2015 15:35:14 +0000 (17:35 +0200)]
Coding style adjustments for nmh-imported code
- No documentation in h/prototypes.h, but rather in the sbr/*.c files
- Convert coding style from nmh to mmh:
+ indent with tabs only not with a tab-spaces-mixture
+ no space between function name and opening parenthesis
+ no space on the inner side of parens
+ no trailing space
+ different comment style
- Variable definition at the beginning of the block only (ANSI C)
- Choose meaningful identifier name rather than add a comment to a
meaningless name
markus schnalke [Wed, 21 Oct 2015 15:13:35 +0000 (17:13 +0200)]
Don't remove the draft on SIGQUIT to allow debugging
Philipp Takacs [Sun, 18 Oct 2015 11:25:33 +0000 (13:25 +0200)]
export MM_CHARSET in mhbuild test
The test has some UTF-8 charracter to test the encoding.
Philipp Takacs [Wed, 23 Sep 2015 11:15:31 +0000 (13:15 +0200)]
use anno and mhparam in sendfiles
Philipp Takacs [Sat, 10 Oct 2015 12:19:07 +0000 (14:19 +0200)]
decode recipient-fields by default
Philipp Takacs [Fri, 25 Sep 2015 10:50:56 +0000 (12:50 +0200)]
add a test for mhbuild rfc2047-support
This is only the first test, more come later.
Philipp Takacs [Sat, 19 Sep 2015 21:25:57 +0000 (23:25 +0200)]
porte encode_rfc2047 from nmh
Now a user can add any nonascii in header-fields.
mhbuild now encode this acourding to rfc2047.
Thanks Ken Hornstein <kenh@pobox.com>
markus schnalke [Fri, 2 Oct 2015 17:49:38 +0000 (19:49 +0200)]
mhbuild: Avoid a dot on a line on its own
mhbuild's quoted-printable encoder breaks lines to have at most
CPERLIN chars. If the it happens that the last character on the
line is a dot (`.') and the line is broken just before it, then
the following line contains nothing but one single dot. This
currently leads to problems in mmh ... but it may cause problems
to other mail software as well. Hence we avoid it by encoding
any dot at the beginning of a line, just to be sure.
markus schnalke [Fri, 2 Oct 2015 17:24:28 +0000 (19:24 +0200)]
Sleep only 1 sec before retry to lock the file
The previous 5 seconds might have been appropriate on old, heavy
loaded systems, but they will hardly be necessary on modern ones.
markus schnalke [Fri, 2 Oct 2015 17:18:32 +0000 (19:18 +0200)]
Show the date hdr in local time in the default scan listing
markus schnalke [Fri, 2 Oct 2015 06:22:53 +0000 (08:22 +0200)]
Improve wording and more description in man page spost(8)
Ken Hornstein [Thu, 14 Nov 2013 16:43:33 +0000 (11:43 -0500)]
Break out the unquote functionality to a separate function.
David Levine [Sun, 25 Nov 2012 15:06:20 +0000 (09:06 -0600)]
pick(1) decode rfc2047-fields
Attempt to decode each header field as if it were
MIME encoded.
Philipp Takacs [Sun, 6 Sep 2015 21:29:21 +0000 (23:29 +0200)]
include h/utils.h
I forgot uip/ap.c and uip/burst.c, too
Philipp Takacs [Sun, 6 Sep 2015 21:11:15 +0000 (23:11 +0200)]
include h/utils.h
I forgot to add it in sbr/addrsbr.c sbr/fmt_compile.c
Philipp Takacs [Sat, 5 Sep 2015 23:09:15 +0000 (01:09 +0200)]
replaced calloc with mh_xcalloc
This finished the work of David Levine,
which was portet in the last commit.
David Levine [Sat, 11 Oct 2014 14:22:52 +0000 (09:22 -0500)]
Added mh_xcalloc().
Philipp Takacs [Sat, 29 Aug 2015 09:56:34 +0000 (11:56 +0200)]
fix open up to 4 times on mbox_open()
Befor this lkopen was only called ones.
Philipp Takacs [Thu, 27 Aug 2015 19:59:11 +0000 (21:59 +0200)]
reimplement Dcc-field
Dcc is like Bcc but don't send an extra message
with the orginal message attched. See FAQ for
more details.
Philipp Takacs [Sun, 28 Jun 2015 22:42:31 +0000 (00:42 +0200)]
find recipients for sendmail
Recipients are given as comandline arguments to sendmail.
Also do aliasing on every header which contain an address.
Philipp Takacs [Sat, 5 Sep 2015 11:10:33 +0000 (13:10 +0200)]
Revert "Remove stdio internals manipulation in sbr/m_getfld.c"
This only temporaly, to ensure mmh is working correct.
This reverts commit
976303d04d3bc2cad0afd5e3d364264783da56c2.
David Levine [Tue, 25 Dec 2012 17:57:31 +0000 (11:57 -0600)]
Remove stdio internals manipulation in sbr/m_getfld.c
Replaced all the stdio buffer access in sbr/m_getfld.c with a single call
to fread() and then some almost straightforward buffer manipulations.
This commit is ported to mmh.
markus schnalke [Sat, 29 Aug 2015 14:39:59 +0000 (16:39 +0200)]
Make msg_delim file static to sbr/m_getfld.c
Thanks to David Levine <levinedl@acm.org> for nmh commit
e69044f7624abe5cb2cb796d528c0cc5f29515f7
markus schnalke [Sat, 29 Aug 2015 08:48:22 +0000 (10:48 +0200)]
Merge branch 'master' of ssh://marmaro.de:443/var/git/mmh
markus schnalke [Sat, 29 Aug 2015 08:47:56 +0000 (10:47 +0200)]
Merge remote-tracking branch 'origin/master'
Philipp Takacs [Fri, 28 Aug 2015 09:53:03 +0000 (11:53 +0200)]
Bring back the LINUX-IO check from the last commit
We need them for m_getfld(), too.
This reverts parts of the commit
33516e5b74bb4bb5c626d4ee42bd3a7a9faaabef.
markus schnalke [Wed, 29 Apr 2015 05:09:43 +0000 (07:09 +0200)]
Drop register storage class
David Levine [Wed, 26 Dec 2012 01:25:43 +0000 (19:25 -0600)]
Remove discard() total
discard() isn't needed in mmh anymore.
markus schnalke [Wed, 26 Aug 2015 19:36:54 +0000 (21:36 +0200)]
Fix autoconf check for mailspool world write permission
This is a bugfix and improvement for commit b15b7cc (``Use
realpath to find the mailspool'').
We can even do this check much simpler, if we focus on the
problem that
$lspath -dlL $mailspool
does not check the target of a symlink, although -L is given.
The contradicting -d seems to overrule it.
We can fix this more easily by appending a slash to the path:
$ ls -ld /var/mail/
drwxrwxr-t 2 root root 4096 Apr 29 06:36 /var/mail//
Without the slash it was:
$ ls -ld /var/mail
lrwxrwxrwx 1 root root 10 Nov 22 2011 /var/mail -> spool/mail/
This small change does it for one level of indirection.
This should be sufficient.
Philipp Takacs [Fri, 7 Aug 2015 13:22:23 +0000 (15:22 +0200)]
Ignore empty MIME parameter
If a message contains an empty parameter, we only produce a warning.
Philipp Takacs [Tue, 4 Aug 2015 19:26:14 +0000 (21:26 +0200)]
Ignore wrong encoding in multipart/*
If a multipart message has an encoding other then
7bit or 8bit, 7bit encoding is assumed.
Philipp Takacs [Sun, 31 May 2015 00:10:32 +0000 (02:10 +0200)]
remove dublicated code in uip/spost
To avoid bugs like in commit
dc81afc84b4d53177a1c4
Philipp Takacs [Sat, 30 May 2015 22:53:11 +0000 (00:53 +0200)]
fix bug if multible mbox in From-field
Now the first address of the user is used, if multible addresses
are in the From-field. If non of the addresses is an address
of the user, the the behaviour has not changed.
Philipp Takacs [Sat, 2 May 2015 12:36:50 +0000 (14:36 +0200)]
bugfix for a memory-reuse bug spost and whom
spost and whom use add to initialize a temporary char*.
This pointer maybe points to internal data or already freed
memory. Now getcpy is used.
markus schnalke [Wed, 29 Apr 2015 05:03:09 +0000 (07:03 +0200)]
spost: Refactor braces, comments, etc.
markus schnalke [Wed, 29 Apr 2015 04:47:13 +0000 (06:47 +0200)]
gitignore: More specific ignore patterns
I frequently make temporary backups this way:
cp uip/foo.c uip/foo.c.1
These files were ignored, although this ignore filter was meant
for the created man pages in section 1 only.
Philipp Takacs [Sat, 18 Apr 2015 22:53:14 +0000 (00:53 +0200)]
Add "Default-From" config option
The "Default-From" config option is used, if the Draft
don't contain a From header. If the draft contains a From
header and it's not from the user it's used as the Sender
header.
Bug: If the From-header contains more then one addresse
and one is from the user, no Sender-header is attached.
Philipp Takacs [Sat, 6 Dec 2014 14:20:12 +0000 (15:20 +0100)]
Use realpath to find the mailspool
inc is istalled with setgid-flag if the mailspool
isn't world writeable and dot-locking is used. This
work now if the mailspool is a sysmlink.
Philipp Takacs [Tue, 14 Apr 2015 13:29:56 +0000 (15:29 +0200)]
Use sysexits.h for better exit-codes
The sysexits header describe some standard exit-codes, which should
be used. adios has now a status argument so sysexits.h can be used.
Philipp Takacs [Tue, 14 Apr 2015 12:33:36 +0000 (14:33 +0200)]
reinclude some headers
These includes are necessary to compile on FreeBSD.
markus schnalke [Fri, 10 Apr 2015 10:30:56 +0000 (12:30 +0200)]
Move #include from h/mh.h to source files
Included files should not include further files. Now, only the
necessary files are included and not all of them in every file.
A large bunch of this work is done, but there are some more
nested include files.
markus schnalke [Fri, 10 Apr 2015 09:21:12 +0000 (11:21 +0200)]
Remove h/nmh.h
Move its contents to h/mh.h.
Remove the NLENGTH macro on the way, be cause it is not used.
markus schnalke [Fri, 10 Apr 2015 08:59:30 +0000 (10:59 +0200)]
Minimize the include
It's not necessary to include <h/signals.h>, <signal.h> is enough.
markus schnalke [Thu, 9 Apr 2015 10:44:58 +0000 (12:44 +0200)]
Fix FTBFS bug introduced by 600379c
One #include of h/signals.h is still necessary.
David Levine [Sat, 14 Feb 2015 03:31:48 +0000 (21:31 -0600)]
Removed unnecessary #include of h/signals.h.
Marcin Cieslak [Tue, 10 Feb 2015 14:18:05 +0000 (14:18 +0000)]
Fixed the error message in lockit() when it fails to create tmp file.
David Levine [Sat, 14 Feb 2015 04:22:21 +0000 (22:22 -0600)]
Removed m_chkids(), per suggestion of Marcin Cieslak.
David Levine [Sat, 14 Feb 2015 03:30:41 +0000 (21:30 -0600)]
Removed #include of signal.h because it's in h/signals.h.
Marcin Cieslak [Fri, 13 Feb 2015 03:09:26 +0000 (21:09 -0600)]
Replaced setgid() calls with setegid() so that it works with dot
locking on FreeBSD. setegid() should be supported on modern POSIX
systems.
Philipp Takacs [Sat, 7 Mar 2015 00:41:12 +0000 (01:41 +0100)]
remove declaration of child_id in slocal:usr_pipe
Now the global version is used, so the signal handler
works correct.
Philipp Takacs [Sun, 22 Feb 2015 22:26:38 +0000 (23:26 +0100)]
return -1 if fork(2) fails in execprog
If fork in execprog fails and return 1 there is now
way to different between a proces witch return 1.
Thanks Marcin Cieslak <saper@saper.info> for reporting.
Philipp Takacs [Sat, 21 Feb 2015 11:09:33 +0000 (12:09 +0100)]
remove longjmp from signal handler in mhl
To avoid undefined behavior set an interrupt flag
in the signal handler.
Philipp Takacs [Sat, 21 Feb 2015 10:38:18 +0000 (11:38 +0100)]
remove longjmp in signalhandler of slocal
To avoid undefined behavior kill the child process
in the signal handler and set an interrupt flag.
Philipp Takacs [Sat, 21 Feb 2015 10:05:43 +0000 (11:05 +0100)]
remove longjmp in signalhandler of prompter
to avoid undefined behavior use close(2) in the signal handler
Philipp Takacs [Sat, 21 Feb 2015 10:03:26 +0000 (11:03 +0100)]
remove longjmp from signalhandler in getans
To avoid undefined behavior use close in the signal handler.
Philipp Takacs [Sun, 22 Feb 2015 13:26:27 +0000 (14:26 +0100)]
nonstatic function for atexit, check if atexit fails
atexit needs nonstatic functions to work correct. The
error check is importent, because atexit can fail for
some reasons and the cleanup woulden't work.
markus schnalke [Sat, 14 Feb 2015 16:44:14 +0000 (17:44 +0100)]
Merge branch 'master' of ssh://marmaro.de:443/var/git/mmh
Conflicts:
uip/mhl.c
uip/mhlist.c
uip/mhmail.c
uip/pick.c
uip/send.c
markus schnalke [Sat, 14 Feb 2015 16:29:22 +0000 (17:29 +0100)]
Refactor: Use if for two-way branching; Compare against 0 explicitly
I think that the use of switch for the two-way branches could have
been a performance optimization. I think it's clearer to use if,
especially in the fall-through case.
As setjmp() is known to return with either 0 or something else, we
should compare against 0 and not against some define (for which I
again and again wonder if it stands for 0 or for 1).
markus schnalke [Sat, 14 Feb 2015 16:28:05 +0000 (17:28 +0100)]
Fix minor coding style issues (whitespace)
markus schnalke [Sat, 14 Feb 2015 16:27:11 +0000 (17:27 +0100)]
Remove unnecessary headers
Philipp Takacs [Fri, 30 Jan 2015 01:25:17 +0000 (02:25 +0100)]
distout and ready_msg return NOTOK on error
If distout or ready_msg fails, the cleanup of send is done.
markus schnalke [Thu, 12 Feb 2015 06:49:33 +0000 (07:49 +0100)]
mhmail: use execprog()
markus schnalke [Thu, 12 Feb 2015 06:40:50 +0000 (07:40 +0100)]
sbr/execprog.c: Fix the return value
Use pidXwait(), which invokes pidstatus(), here for error reporting.
This eases the use of execprog() because we don't have to call it
there everytime. However, it might be unwanted to put the error
printing stuff into execprog() because we might have an invokation
of execprog() that want's to deal with errors itself in a different
way. If this would be the case, then we likely should change
pidXwait() to pidwait() and call pidstatus(execprog()).
markus schnalke [Wed, 11 Feb 2015 07:11:53 +0000 (08:11 +0100)]
Minor clarifications in mhmail(1)
markus schnalke [Wed, 11 Feb 2015 07:04:35 +0000 (08:04 +0100)]
Update the man pages to the shortened reserved sequence names
These reserved sequence names were shortened to one character
long ago in the code. Now the docs are adjusted to that change.
Thanks to Marcin for spotting it.
Philipp Takacs [Thu, 29 Jan 2015 22:02:58 +0000 (23:02 +0100)]
Initialize status in uip/send.c
Thanks Marcin Cieslak <saper@saper.info> for reporting.
markus schnalke [Mon, 26 Jan 2015 17:44:50 +0000 (18:44 +0100)]
Merge ../mmh
Conflicts:
uip/rmm.c
uip/whatnow.c
Philipp Takacs [Sat, 17 Jan 2015 22:46:30 +0000 (23:46 +0100)]
remove done finaly
removed the used of done in sbr and the dafinition
in the header. Also the source file is removed.
Philipp Takacs [Sat, 17 Jan 2015 22:43:28 +0000 (23:43 +0100)]
remove last rests of done in uip
At some points done was used as callback funktion.
Philipp Takacs [Fri, 16 Jan 2015 21:31:04 +0000 (22:31 +0100)]
Remove done from mhl pick and send
Second part of removing done, to make the code
better to read. This tools needed some refactoring
before done could removed. Next step is removing
done from sbr.
Philipp Takacs [Sat, 17 Jan 2015 01:00:22 +0000 (02:00 +0100)]
Initialize vecp in send anno()
Access to an uninialized variable can cause
a a buffer overflow or underrun.
(Thanks to the compiler for reporting.)
Philipp Takacs [Sat, 17 Jan 2015 00:01:57 +0000 (01:01 +0100)]
Add tests for pick
Add two patches for pick. One to test the normale behavior,
and one to test if a ``0'' is print to stdout when no message is
find.
Philipp Takacs [Fri, 16 Jan 2015 19:48:09 +0000 (20:48 +0100)]
Bugfix in pick.c
Undo last last commit in uip/pick.c. pick shoud only print "0" if
it exit with a non-zero exit.
Philipp Takacs [Sun, 14 Dec 2014 13:45:35 +0000 (14:45 +0100)]
Replace done with exit at uip
Replace done with exit in most sourcefiles of uip. This makes the
code better to read. If the done was overwritten by an externel function
atexit() is used instand.
send.c and mhl.c are excluded, because need a bit rewrite first.
markus schnalke [Thu, 15 Jan 2015 20:40:53 +0000 (21:40 +0100)]
new: Fix a pointer problem
I should learn to get such stuff right without the need to draw
the memory layout with boxes and lines on paper ...
Thanks to the test suite for catching this one!
markus schnalke [Thu, 15 Jan 2015 20:27:09 +0000 (21:27 +0100)]
send: Fix uninitialied variable
markus schnalke [Thu, 15 Jan 2015 20:18:03 +0000 (21:18 +0100)]
whatnow: Use execprog() ... one more time
markus schnalke [Thu, 15 Jan 2015 20:13:08 +0000 (21:13 +0100)]
whatnow: No need to fork
Plus refactoring.
markus schnalke [Thu, 15 Jan 2015 19:50:50 +0000 (20:50 +0100)]
sbr/ext_hook.c: Use execprog(); Refactoring
markus schnalke [Thu, 15 Jan 2015 19:30:15 +0000 (20:30 +0100)]
rmm: Use execprog() instead of own fork-exec
markus schnalke [Thu, 15 Jan 2015 17:04:06 +0000 (18:04 +0100)]
Remove unused variable
markus schnalke [Thu, 15 Jan 2015 16:53:20 +0000 (17:53 +0100)]
Convert pidXwait() from macro to function
Plus some refactoring and syntactic sugar in pidstatus().
markus schnalke [Thu, 15 Jan 2015 16:08:55 +0000 (17:08 +0100)]
Don't save the context within execprog()
This context_save() call was copied there accidently.