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.
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: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 [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.
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.
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 [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 [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: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 [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()).
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 [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.