summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/cmd3.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the "-r fromaddr" flag now that we don't supportmillert2015-01-201-1/+3
| | | | | | | | 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.
* Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'miod2011-04-061-5/+5
| | | | for chars.
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-9/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Fixed typo in comment.tobias2009-09-051-3/+3
| | | | ok millert
* elide a little bit later, the final list, after From has beenmartynas2009-07-231-3/+3
| | | | | appended. properly removes if there's a dup in from & to. ok millert@
* - use strncmp/strncasecmp instead of comparing by charactermartynas2008-07-161-5/+3
| | | | | | - simplify istrlcpy, no need to check for isupper - line[0] is redundant, because strcasecmp will take care of it ok millert@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Swap args to calloc(3) so they are in the correct order; art@ ok.aaron2002-08-121-4/+4
|
* o kill strcpy()millert2001-11-211-12/+16
| | | | | o check return values of malloc and friends o use strdup() when sensible
* o ANSIfymillert2001-11-211-82/+56
| | | | | | | | | o Style nits o Use const to silent stupid -Wall warnings o strnc{py,at} -> strlc{py,at} o Use strpbrk() instead of homegrown anyof() o Use NULL instead of #defines with 0 cast to a pointer This still could use a proper audit
* Major signal overhaul. We no longer longjmp all over the place.millert2001-11-201-8/+13
| | | | | | | | | | | Instead, routines responsible to gathering user input (or in some cases outputting data) catch the signals and set flags as needed. Because of this some handlers are install without the SA_RESTART flag so syscalls are not restarted and we can check the flag. All signal handlers are now safe. This should make the flow of control a bit more grokable but the code is still ugly.
* More fixes from Don Beusee:millert2001-01-191-4/+4
| | | | | | | - edit and other interactive commands have no stdin (making the command completely broken). - messages with "From " line having date format with -0800 type of timezone are not recognized correctly.
* Changes from Don Beusee:millert2001-01-161-17/+25
| | | | | | | | | | | | | | o escape From line with a leading '>' when needed o only print To: address and Subject lines if actually present o new variable 'allnet' to treat user@foo and user@bar as the same "user" o folders command now takes an optional argument like ls. o new "pipe" (|) command to pipe the message through an arbitrary command o make header display format the same as SunOS 4.1.3 /usr/ucb/mail o tilde commands work regardless of interactive mode. o fix "read: Interrupted system call" error by retrying if EINTR o expanded help file Changes by me: o read the help file via the PAGER as it is now more than 24 lines long
* $HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zeromillert2000-08-021-4/+7
|
* warnx?/errx? paranoia (use "%s" not a bare string unless it is amillert2000-06-301-3/+3
| | | | | | | | | constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
* When incorporating new messages, clear the "new" count before themillert2000-04-251-2/+3
| | | | | inc so the count of new messages is useful afterwards. This makes mail behave more like the SunOS version in this respect.
* NetBSD changes (mostly comsmetic):millert1997-11-141-28/+25
| | | | | | | | replace panic() with calls to err()/errx() use S_IS* instead of doing by hand with S_IF*. Use TIMESPEC_TO_TIMEVAL() and gettimeofday instead of time(2) Use _POSIX_VDISABLE, not 0 Kill register
* Make istrcpy() take a size (not length) field, now called istrncpy().millert1997-07-301-3/+4
| | | | Change some strcpy() -> strncpy() out of paranoia.
* Fix one possible oflow (not exploitable) and do a wee bit of KNF.millert1997-07-301-12/+13
| | | | Much more remains to be done.
* NOSTR -> NULLmillert1997-07-141-35/+35
| | | | Use sigsetjmp/siglongjmp instead of sigjmp/longjmp for portability.
* bcopy() -> memcpy() and fix some casts.millert1997-07-131-16/+16
|
* Merge in NetBSD and 4.4BSD-lite2 changes as well as some of my own.millert1997-07-131-46/+46
| | | | | | | | - handle long lines safely (from NetBSD) - use puts/fputs and putchar/putc when it makes sense - use err/errx and warn/warnx when it makes sense - make return() and sizeof() style consisten - some more buffer safety
* overflows aboundderaadt1997-05-301-3/+3
|
* Use ``mail.local -H'' to do dot locking so we can have mode 755 mailmillert1997-03-291-3/+3
| | | | | spool, change an occurrence of tempnam() to mkstemp(), change some longs and shorts to ints. Mail is now usable again.
* from christos;deraadt1996-06-111-41/+64
| | | | | | | | - Fix PR/105: Implement dot locking protocol and check return value of flock. - Fix PR/2247: Don't call unknown users "ubluit". Issue an error message. - Fix/add prototypes. - Fix warnings. - Use POSIX signal mask calls.
* initial import of NetBSD treederaadt1995-10-181-0/+731