Leah Neukirchen
669af4ffca
mdeliver: ignore last empty line of mbox entries
...
https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml
> Each message is immediately prefaced by a separation line and
> terminated by an empty line.
Bug discovered by skarnet.
Fixes #207 .
3 years ago
Michael Forney
50dfdf5605
include strings.h for str(n)casecmp
...
These POSIX functions are declared in strings.h, so include this
header explicitly instead of relying on the libc's default feature-test
macros to include it through string.h.
4 years ago
Tim Kuijsten
4763032430
pledge(2) all programs
...
All programs except mshow have a very tight set of promises. mshow
has a broad set of promises and might be a good future candidate
to further restrict using unveil(2).
This patch is based on commit 0300a112
by Alex Holst (dated
2017-12-07), which was proposed in GH PR #79 .
* pledged mpick, mflow and mdate so that now all programs are pledged
* removed some unneeded promises and added some missing promises
* move err.h include and OpenBSD ifdef into a new xpledge.h
* cleaned up code aligning and whitespace
Closes : #179 [via git-merge-pr]
4 years ago
Leah Neukirchen
5ee756f6a5
mdeliver: better usage when multiple arguments are given
5 years ago
Leah Neukirchen
53151f4f89
mdeliver: add fallback to utimes for systems that don't have utimensat
...
Namely, macOS before 10.13.
6 years ago
Leah Neukirchen
085138d6a2
mdeliver: work around macOS, which doesn't implement POSIX.1-2008 stat fields
6 years ago
Leah Neukirchen
4e9237f921
mdeliver: clean up logic
6 years ago
Leah Neukirchen
65ddebc87c
mrefile: don't open the file when renaming is enough
6 years ago
Leah Neukirchen
bccacce816
mrefile: try using rename first, when possible
6 years ago
Leah Neukirchen
8d09a5339e
mdeliver: preserve mtime in mrefile
6 years ago
Leah Neukirchen
b85c56f30c
mdeliver: free msg opened for getting timestamp
6 years ago
Leah Neukirchen
6645e80324
mdeliver: force mode 0600 for pipes (BSD gives 0000 here by default)
6 years ago
Leah Neukirchen
0da4342b22
mdeliver: keep permissions of message for freshly created files
6 years ago
Leah Neukirchen
7ea96a6dea
mrefile: better error message on ENOENT
6 years ago
Leah Neukirchen
0d397f6790
mdeliver: fix stray whitespace
6 years ago
Leah Neukirchen
817a111909
mdeliver: improve message when not delivering to a maildir
6 years ago
Leah Neukirchen
ece2717771
mdeliver: more careful Status: parsing
6 years ago
Leah Neukirchen
6eebeaf68f
mdeliver: recognize CRLF empty line after header
6 years ago
Leah Neukirchen
593b1950d6
mrefile: don't default to current message
7 years ago
Leah Neukirchen
5d43ad2404
mdeliver: add refiling capability
7 years ago
Leah Neukirchen
33ce21af6e
mdeliver: style
7 years ago
Leah Neukirchen
66d0eff12f
style
7 years ago
Leah Neukirchen
856883bf69
mdeliver: don't increment line buffer of getdelim
7 years ago
Leah Neukirchen
bbebc9896a
mdeliver: cast printing of time_t
7 years ago
Duncaen
36e9a1afb0
mdeliver: fix error string
7 years ago
Christian Neukirchen
472a74b75b
use getdelim instead of getline
...
Avoids weird macros to build on FreeBSD.
8 years ago
Christian Neukirchen
7c9a5c9c76
mdeliver: parse both Status: and X-Status:, then drop them
8 years ago
Christian Neukirchen
ce625878de
mdeliver: deliver to new/ by default, use -c for cur/ now
8 years ago
Christian Neukirchen
d6b34e26b1
mdeliver: typo
8 years ago
Christian Neukirchen
ee90013fbc
mdeliver: add usage
8 years ago
Christian Neukirchen
468a04644f
add mdeliver
8 years ago