Commit Graph

163 Commits

Author SHA1 Message Date
brd
4a098602d1 Move mail.rc install to usr.bin/mail.
This leverages CONFS to do the install

Approved by:	re (blanket, pkgbase), bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D17216
2018-09-18 20:47:06 +00:00
asomers
dae9290985 Switch the default pager for most commands to less
Finally, a pager for the nineties.

MFC after:	Never
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D13465
Poll:		https://reviews.freebsd.org/V7
2018-08-08 19:24:20 +00:00
delphij
32a7549145 Replace send-mail with the more standarized sendmail, we do not create
links for send-mail in mailwrapper so it did not work anyway.

MFC after:	2 weeks
2017-12-27 06:23:50 +00:00
delphij
4999d25b1f Don't initialize lastlong before assigning it.
MFC after:	2 weeks
2017-12-27 05:59:47 +00:00
eadler
56640efcbe userland: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:01 +00:00
pfg
872b698bd4 General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
eadler
4332772a77 mailaddr(7): wave goodbye
The information here is somewhere between ancient to obsolete.
It refers to a time in the internet's history when manual routing
was still useful, talks about UUCP as if its modern, and refers
to documents which I had trouble tracking down.

It seems unlikely that a manual page in this form would be useful, so
just remove it.

Reviewed By: imp, tsoome, bdrewery(?)
Differential Revision: https://reviews.freebsd.org/D12924
2017-11-11 07:00:40 +00:00
bdrewery
a598c4b809 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
imp
7e6cabd06e Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
bapt
55d7a3bed2 Remove useless Li macro
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:45:10 +00:00
delphij
24e4f21763 Don't reference NULL pointer.
MFC after:	2 weeks
2017-01-24 07:48:36 +00:00
delphij
e1f8052237 Always initialize 'c'.
MFC after:	2 weeks
2017-01-23 07:32:47 +00:00
delphij
29f0c36c1c When creating record file, use umask 077 instead of the default.
MFC after:	2 weeks
2017-01-23 06:04:43 +00:00
pfg
2e191bec45 mail(1): Minor declaration updates.
Missing from r302903.
2016-07-15 20:27:21 +00:00
pfg
8808ec7c8c mail(1): Avoid closing negative file descriptors.
CID:		1008105, 1008106
MFC after:	1 week
2016-07-15 19:43:24 +00:00
pfg
9ec8988232 mail(1): Update more prototypes.
Also rename delete and undelete_messages to deletecmd and undeletecmd
respectively in an attempt to sync with other BSDs.

Obtained from:	OpenBSD
2016-07-15 15:37:54 +00:00
pfg
ea3ff1fe54 mail(1): check for out of memory conditions when calling calloc(3).
X-MFC with:	r302771
2016-07-14 15:09:08 +00:00
pfg
c93e4010d4 mail(1): Bring some fixes from other BSDs.
Fix missing forked job changes from r302776 in wait_child().

Obtained from:	NetBSD
2016-07-14 02:25:29 +00:00
pfg
6c5ab8a438 mail(1): Bring some fixes from other BSDs.
- Use varargs properly
- Use pid_t
- Better handling of error conditions on forked jobs.
- Some prototype and warning cleanups.

Obtained from:	NetBSD (some originaly from OpenBSD)
2016-07-13 16:45:26 +00:00
pfg
000a3f0f8b mail(1): check for out of memory conditions when calling calloc(3).
Suggested by:	oshogbo
MFC after:	3 days
2016-07-13 14:59:17 +00:00
delphij
9ef603fa1f Use _PATH_DEVNULL instead of hardcoding.
MFC after:	2 weeks
2016-07-11 05:44:58 +00:00
pfg
88f8a963db mail(1): Fix a comment.
Obtained from:	NetBSD (CVS Rev 1.29)
2016-07-11 00:03:39 +00:00
pfg
068e5caf0c mail(1): Invert calloc(3) argument order.
calloc(3) is documented to have first a number and then a size.

Obtained from:	OpenBSD (through NetBSD)
2016-07-10 02:46:20 +00:00
truckman
6957aa1da6 Always return either a dynamically allocated string or NULL from
expand().  Never return the name parameter, which could be a the buf[]
buffer which is allocated on the stack by getdeadletter() and which
would then be used after getdeadletter() has returned.

Reported by:	Coverity
CID:		1199383
MFC after:	1 week
2016-05-13 06:15:05 +00:00
jilles
8156bf7454 mail: Don't truncate mtime of mailbox to microseconds. 2016-04-17 20:00:24 +00:00
pfg
fae984a570 Fix naive use of ftell(3).
Secure coding practices, FIO19-C.
2016-02-16 21:39:19 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
bapt
6720ff676c Add const to the copyright variable
Bump WARNS to level 2
2015-06-06 13:13:39 +00:00
sjg
b137080f19 Merge from head@274682 2014-11-19 01:07:58 +00:00
pfg
4f5a56e73c Always check the limits of array index variables before using them.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2014-08-21 02:40:33 +00:00
sjg
5860f0d106 Updated dependencies 2014-05-16 14:09:51 +00:00
sjg
1a7e48acf1 Updated dependencies 2014-05-10 05:16:28 +00:00
sjg
62bb106222 Merge from head 2013-09-05 20:18:59 +00:00
kevlo
67f40d0cd3 Remove unnecessary cast to pid_t. 2013-07-04 03:24:58 +00:00
sjg
97d8b94956 sync from head 2013-04-12 20:48:55 +00:00
sjg
6d37b86f2b Updated dependencies 2013-03-11 17:21:52 +00:00
sjg
0ee5295509 Updated dependencies 2013-02-16 01:23:54 +00:00
dim
f4e7f0ad5a Fix undefined behaviour in usr.bin/mail/util.c.
Reported by:	deeptech71@gmail.com
MFC after:	3 days
2013-02-15 23:59:57 +00:00
sjg
778e93c51a Sync from head 2012-11-04 02:52:03 +00:00
ed
02dcf28b58 Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

	int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
2012-09-01 14:45:15 +00:00
marcel
9dd41e3647 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
eadler
336581c2f4 Fix likely race condition if wait_child() is interrupted by sigchild()
PR:		bin/102834
Submitted by:	Andreas Longwitz <longwitz@incore.de>
Approved by:	cperciva
MFC after:	2 weeks
2012-05-30 03:55:44 +00:00
kevlo
96dbfe4e2d fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
uqs
2b302aad9f Touch up some more small typos missed in the previous round.
Reported by:	Ben Kaduk <minimarmot@gmail.com> et al.
2012-01-05 21:36:45 +00:00
uqs
9953595f97 Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
dim
3aeee4ad81 In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
ptrdiff_t.  In usr.bin/mail/main.c, cast a field width to int.

MFC after:	1 week
2011-12-17 16:30:42 +00:00
ed
0bcfe62162 Replace __const by const in all non-contributed source code.
As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
2011-12-13 13:32:56 +00:00
maxim
8e6dc31ba7 o Fix -u flag description: it takes a username as an argument.
PR:		docs/153416
Submitted by:	Eitan Adler
MFC after:	1 week
2010-12-25 17:35:30 +00:00
charnier
f4859bef57 Add __unused. Ansi prototypes. 2010-12-19 16:25:23 +00:00