summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add some references, most of these were removed when we stopped buildingjsg2021-03-081-2/+8
| | | | | | and installing USD/SMM/PSD docs. jmc@ agrees with the direction, ok millert@ on an earlier diff
* satisfy -fno-common, by (1) copying all the variable decls fromderaadt2021-01-262-42/+94
| | | | | | indent_globs.h to indent.c, and (2) changing all the same decls in indent_globs.h to be extern ok mortimer
* the name aux is a reserved filename on windowsdaniel2020-12-152-4/+4
| | | | | | | | | | | | | NetBSD renamed this file to support.c in 2001, while FreeBSD chose to rename this file to util.c in 2009. We go the FreeBSD route and pick util.c since our implementation is closer to the FreeBSD codebase. Helps get us closer to being able to check out OpenBSD source code on Windows as requested by John Carmack. This issue thoroughly researched by jsg@ ok deraadt@, sthen@, "go ahead" jsg@
* More Version 1 AT&T UNIX history.schwarze2019-09-061-3/+3
| | | | | | This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-289-29/+29
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* When running sendmail, set argv[0] to "sendmail" not "send-mail".millert2019-03-191-2/+2
| | | | | This was a historical oddity that dates back to back to the days of delivermail.
* Replace the local getname() and getuserid() functions with callsmillert2018-09-169-92/+32
| | | | | | to user_from_uid(3) and uid_from_user(3). This requires sprinkling const in a few places to match the return value of user_from_uid(3). OK tb@
* Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther2018-04-261-3/+1
| | | | | | | Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
* improve markup quality in the cases found by the new "--" style messageschwarze2018-03-161-5/+4
|
* Replace usage of TIOCSTI in mail while editing headers using a more commonanton2017-06-281-125/+203
| | | | | | | | IO-loop where ICANON is disabled and a single char of input is read at a time. This requires the line editing capabilities provided when ICANON is enabled to be implemented. ok deraadt@
* tweak previous to read a little better;jmc2017-05-291-12/+6
|
* remove mention of Berknet and mailaddr.7tedu2017-05-291-7/+2
|
* Prevent edit'ing a message from corrupting the mailbox. In an mbox filenatano2017-03-281-3/+11
| | | | | | | every message is terminated by an empty line, so we have to make sure it is preserved. Otherwise the message is combined with the next one. joint effort with deraadt and millert
* these programs probably do not need to use TMPDIR. ok floriantedu2016-07-282-7/+4
|
* Cleanup close(open idioms.deraadt2016-07-192-5/+12
| | | | ok krw
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-2/+1
| | | | | | | | | | | | correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
* missing pledge "getpw"deraadt2015-11-241-2/+2
|
* pledge "stdio rpath wpath cpath tmppath fattr tty flock proc exec"deraadt2015-11-161-1/+5
|
* creat() -> open equiv; from Frederic Nowakderaadt2015-11-112-4/+4
|
* Cast isspace() argument to unsigned char.mmcc2015-10-161-2/+2
| | | | ok jca@
* Modernize allocation by:mmcc2015-10-1611-43/+42
| | | | | | | | | * removing unneeded casts of void* return values * replacing varied and creative error messages with the allocation function's name * replacing errx() with err() so that the errno string is reported ok beck@, jung@, millert@
* To alter just the atime of the mailspool, use utimensat()+UTIME_OMIT insteadguenther2015-10-132-17/+10
| | | | | | | of stat()+utimes(). Prefer clock_gettime() over gettimeofday() to avoid timeval->timespec conversion ok millert@
* add missing file system path (.Pa) macros.sobrado2015-09-071-4/+4
|
* in getopt() blocks, stop incrementing flag variable which are supposedderaadt2015-02-081-2/+2
| | | | | to just be 0/1 ok miod florian
* Fix getopt string; the -N flag doesn't take an argument.millert2015-01-241-2/+2
| | | | From Matthew Clarke
* Only allow the -r flag when sending a message; from Martin Brandenburgmillert2015-01-221-3/+5
|
* tweak previous;jmc2015-01-201-3/+3
|
* Add support for the "-r fromaddr" flag now that we don't supportmillert2015-01-207-73/+81
| | | | | | | | sendmail flags on the command line. Also allow "from" to be set in mailrc. Use sendmail's "-t" flag when executing sendmail instead of specifying the list of recipients in argv. The "-f" flag will be used to set the from address if specified.
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-164-11/+11
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* It is the copy command that is abbreviated as 'c', not chdir.millert2015-01-071-3/+5
| | | | Also document that cd is an alias for chdir. From Kaspars Bankovskis.
* Document the '=' command; from trondd at gmailmillert2015-01-071-2/+4
|
* Don't pass options after the to address to sendmail. The onlymillert2014-12-162-8/+3
| | | | | legitiate use of this is to set the sender name which should be handled specifically by a different option.
* Add new "expandaddr" flag (disabled by default) to enable recipientmillert2014-12-162-3/+52
| | | | | | | address expansion and document it. Previously, this behavior was always enabled. Also document how address expansion is performed, which used to only be described in the (no longer installed) Mail Reference Manual. CVE-2014-7844
* Use glob() to expand filenames instead of passing it to the shell'smillert2014-12-161-49/+26
| | | | | echo command for expansion which could result in arbitrary command execution. CVE-2004-2771
* Change "will write" back to "writes" in -f description. From jmc@millert2014-11-241-2/+2
|
* The handling of the -f option is a hack. Instead of fooling aroundmillert2014-11-242-23/+27
| | | | | | | with argv behind getopt()'s back we can just treat the remainder of argv[] after option processing as the file name for -f. It is not possible to use -f in sending mode so there is no ambiguity. OK tobias@
* Remove undocumented and obsolete -T option. It was intended formillert2014-11-244-48/+9
| | | | use with old netnews. OK sobrado@ tobias@
* Prefer mkostemp(O_CLOEXEC) over mkstemp()+fcntl(F_SETFD)guenther2014-10-261-5/+3
| | | | | | Prefer fopen("re") over fopen("r")+fcntl(F_SETFD) ok otto@ millert@
* Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)guenther2014-08-151-3/+2
| | | | | | | on it, simplifying error checking, reducing system calls, and improving thread-safety for libraries. ok miod@
* Repair two deep targets mistakenly called as afterinstall, ratherderaadt2014-07-221-5/+3
| | | | | than distribution. These would modify files in /etc, part of the base set, but still... that makes it harder to discern their sets placement.
* Use errc/warnc to simplify code.guenther2014-05-201-5/+3
| | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
* make this page less sendmail-centric; ok gillesjmc2014-03-271-8/+6
|
* lint is dead (long live the lint!), so stop using it as a cpp conditionalguenther2014-03-161-2/+2
| | | | | | (namespace pollution!) or talking about its opinion on code. ok krw@
* pedantic word change;jmc2014-03-101-3/+3
|
* Obvious .Xr fixes, found while testing mandocdb(8).schwarze2014-01-201-3/+3
|
* ctype and other sign extension fixes.okan2014-01-179-51/+54
| | | | with deraadt and millert, ok millert
* flesh out STANDARDS somewhat; help/ok sobradojmc2014-01-081-3/+17
| | | | this was also ok millert some time ago
* document the :c selectors; from Sunil Nimmagaddajmc2013-07-181-10/+26
|
* use FD_CLOEXEC instead of 1; from David Hillokan2013-04-293-10/+10
| | | | ok otto
* use F_OK macro instead of 0 in access() when checking by file existence. make the code easier to read.gsoares2012-11-141-2/+2
| | | | | | no functional change. OK millert@