History log of /freebsd-10.0-release/usr.bin/mail/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


252679 04-Jul-2013 kevlo

Remove unnecessary cast to pid_t.


246860 16-Feb-2013 dim

Fix undefined behaviour in usr.bin/mail/util.c.

Reported by: deeptech71@gmail.com
MFC after: 3 days


239991 01-Sep-2012 ed

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.


236286 30-May-2012 eadler

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


230044 13-Jan-2012 kevlo

fgets(3) returns a pointer, so compare against NULL, not integer 0.


229655 05-Jan-2012 uqs

Touch up some more small typos missed in the previous round.

Reported by: Ben Kaduk <minimarmot@gmail.com> et al.


228992 30-Dec-2011 uqs

Spelling fixes for usr.bin/


228647 17-Dec-2011 dim

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


228468 13-Dec-2011 ed

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.


216698 25-Dec-2010 maxim

o Fix -u flag description: it takes a username as an argument.

PR: docs/153416
Submitted by: Eitan Adler
MFC after: 1 week


216564 19-Dec-2010 charnier

Add __unused. Ansi prototypes.


216562 19-Dec-2010 charnier

Add __unused. Ansi prototypes.


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


216178 04-Dec-2010 uqs

Move most of the remaining USD/PSD/SMM papers into share/doc


208592 27-May-2010 uqs

mail(1) misses addresses when replying to all

There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook, eg.:
Cc: <foo@bar.com>,"Mr Foo" <foo@baz.com>

The following line now splits into the right tokens:
Cc: f@b.com,z@y.de, <a@a.de>,<c@c.de>, "foo" <foo>,"bar" <bar>

PR: bin/131861
Submitted by: Pete French <petefrench at ticketswitch.com>
Tested by: Pete French
Reviewed by: mikeh
MFC after: 2 weeks


205793 28-Mar-2010 ed

Change all our own code to use st_*tim instead of st_*timespec.

Also remove some local patches to diff(1) which are now unneeded.


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


187331 16-Jan-2009 ed

Rename mail(1)'s aux.c to util.c.

The name `aux' is reserved on Windows file systems. aux.c in the mail(1)
directory contains some random utility functions. I'm renaming this file
to util.c to make it possible to check out this directory on Windows.

MFC after: 1 month


180208 03-Jul-2008 peter

Set magic fbsd:nokeywords property that allows files to bypass
keyword expansion. (file-specific replacement for CVSROOT/exclude)


173439 08-Nov-2007 dds

Use static storage-class specifier where appropriate.
Found by: CScout


173438 08-Nov-2007 dds

Make function's definition follow its declared visibility.
Found by: CScout


167879 25-Mar-2007 maxim

o Really commit typo fixes to HEAD.

PR: docs/110809
Submitted by: naddy


154052 05-Jan-2006 dds

Document the TMPDIR environment variable.

MFC after: 1 week


151053 07-Oct-2005 yar

Sync usage screen with manpage.

MFC after: 5 days


151052 07-Oct-2005 yar

Document the -d flag to mail(1) better, which comes handy when
you want to see, e.g., sendmail arguments mail(1) will use.

-H is not an independent flag, it's a modifier. Also explicitly
say that -H will cause mail(1) to exit as soon as it prints the headers.

MFC after: 5 days


149196 17-Aug-2005 cperciva

Remove the dates from these files. They serve no purpose and result in
these files spuriously changing each time they are built.

Also, add $FreeBSD$ tags, because cvs is unhappy otherwise.


129430 19-May-2004 ru

Bumped document date.
Dealt with hard sentence breaks and whitespace at EOL.


126759 09-Mar-2004 mikeh

These aren't all binary options.


126691 06-Mar-2004 mikeh

Assign checkmode boolean earlier to handle the goto jump.

Might fix PR bin/63769.


126415 29-Feb-2004 mikeh

Add the -e (mail presence test), -H (header summary mode), and -F
(message save as first recipient) options for standards
conformance.

Submitted by: Wartan Hachaturow <wart@tepkom.ru> (with some changes)
PR: standards/61934


110343 04-Feb-2003 trhodes

Remove 2 more unused doc Makefiles.


108988 09-Jan-2003 mikeh

The return-path is optional in a headline, therefore don't skip a
message if it is missing the return-path.

PR: bin/40314 (slightly different patch)
MFC after: 2 weeks


108982 09-Jan-2003 mikeh

Correct a few more definitions, capitalize header fields consistently.


108980 09-Jan-2003 mikeh

Clarify ~. escape definition, remove duplicate entry, and shorten a
definition.


108978 09-Jan-2003 mikeh

Document the ~. and ~? command escapes.


102412 25-Aug-2002 charnier

Replace various spelling with FALLTHROUGH which is lint()able


100872 29-Jul-2002 ru

Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by: bde


100313 18-Jul-2002 ru

s/${INSTALL} -c/${INSTALL} ${COPY}/


99112 30-Jun-2002 obrien

Consistently use FBSDID


98805 25-Jun-2002 mikeh

Add support for the 'flipr' option per IEEE 1003.1-2001.


98804 25-Jun-2002 mikeh

Use strcasestr() instead of reimplementing it.


98803 25-Jun-2002 mikeh

Make the 'searchheaders' option behave how it was supposed to. If
enabled, the string '/to:y' will match strings in the To, Cc, and Bcc
header fields. Whereas, '/To:y' will match only the To field. Edit the
manpage and a code comment to indicate the correct behavior.


98802 25-Jun-2002 mikeh

Rearrange a little, specifically:

- removed "Option string values" section and divided up amongst mail
options and environment section
- expanded environment section
- rearranged mail options
- added default values to the mail options for clarification

Reviewed by: ru


95124 20-Apr-2002 charnier

Use `The .Nm utility'


92921 22-Mar-2002 imp

remove __P


91227 25-Feb-2002 bde

#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval. Intentionally
don't follow the local style of polluting the local headers.


90416 08-Feb-2002 markm

Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.


89669 22-Jan-2002 charnier

Show arguments of command line options
Reviewed by: ru


89573 19-Jan-2002 mikeh

Link mail(1) to mailx per POSIX. Mail(1) isn't 100% POSIX compliant,
but it is pretty close.

Not objected to by: -standards


89209 10-Jan-2002 ru

mdoc(7) police: oops, forgot about those interim XXX'es.


89208 10-Jan-2002 ru

mdoc(7) police: tidy up.


88434 23-Dec-2001 mikeh

Fix comment.


88428 22-Dec-2001 mikeh

Add support for ~_, ~x, ~i, ~a, ~A, ~<, and ~r! tilde-escapes. Improve
tilde-escapes documentation.

Mostly obtained from: NetBSD


88229 19-Dec-2001 ache

Add missing {} to 'for'. It fix coredump (result of NetBSD changes merge)


88227 19-Dec-2001 ache

Add (unsigned char) cast to ctype macros
ftell->ftello, fseek->fseeko
File 'newsize' type int->off_t
Add visible (long) cast to fsize() when it called to small one message file and
result is assigned to long.


88150 18-Dec-2001 mikeh

Sync with most of NetBSD's changes, including:

*) Sync with 4.4BSD-Lite2
*) Set usecs for utimes()
*) Add 'inc' command and 'autoinc' option that check for new mail
manually and automatically, respectively
*) Use POSIX signal handling and tty semantics
*) Handle long lines correctly when paging messages
*) Add ability to explicitly search 'To:' line
*) Various manpage cleanups
*) Support overriding '~/.mailrc' with $MAILRC
*) Support 'askbcc' and 'asksub' options
*) Fix various bugs

Reviewed by: ru (mail.1)
Obtained from: NetBSD


88064 17-Dec-2001 ru

Install files via FILES.


87745 12-Dec-2001 mikeh

I'm working on cleaning this up, however it probably won't be done for
awhile. Turn off WARNS so that this doesn't break the build when WARNS
is turned on higher up. Also add $FreeBSD$.


83848 23-Sep-2001 mikeh

Don't add space after comma unless there was already one (prevents a
rare overflow). Optimize loop slightly. Don't exit if realloc can't
shrink a buffer (just continue and use the larger buffer).

Obtained from: OpenBSD
MFC after: 2 weeks


82793 02-Sep-2001 ache

File positions are off_t nowdays, not long, so:
fseek -> fseeko
ftell -> ftello

NOTE: fseek/ftell not works for >long offsets per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.

[EOVERFLOW] For ftell ( ), the current file offset cannot be represented
correctly in an object of type long.


81979 20-Aug-2001 brian

Handle snprintf() returning -1.

MFC after: 2 weeks


81586 13-Aug-2001 ru

Removed duplicate VCS ID tags, as per style(9).


81449 10-Aug-2001 ru

mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79535 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79277 05-Jul-2001 ru

mdoc(7) police: fixed formatting bugs in rev. 1.27.


78904 28-Jun-2001 mikeh

Add the -E flag to not send messages that have an empty body. This is
useful for piping cron script error output by mail.

PR: bin/9494
Obtained from: NetBSD
MFC after: 2 weeks


78737 24-Jun-2001 dd

Nuke unused variables.


78398 18-Jun-2001 mikeh

Support mail boxes that have dates without seconds (SysV) and those
that have a timezone as <-|+>nnnn (eg. imapd).

PR: bin/11746
Obtained from: OpenBSD
MFC after: 2 weeks


78193 14-Jun-2001 mikeh

Respect REPLYTO in mailrc.

PR: bin/8322
Submitted by: Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
MFC after: 2 weeks


77274 27-May-2001 mikeh

Cleanup mail(1)'s varying styles by converting to using style(9).

Also take a stab at cleaning up BDECFLAGS and convert all uses of
NOSTR, NIL, NONE, NOVAR, NOGRP, NOGE to NULL. Also kill 'register' to
get diffs somewhat closer to OpenBSD/NetBSD.

There are no functional changes however.
Reviewed by: nra (visual inspection)


76455 11-May-2001 mikeh

Allow mail(1) to be able to read Eudora mailboxes by transforming
lines that end in <CR><LF> to just <LF>.

Reviewed by: imp
Obtained from: OpenBSD


74769 25-Mar-2001 mikeh

Merge various changes from OpenBSD and NetBSD.

o remove panic() in favor of err(3) and use err(3) functions
consistently throughout
o use stat(2)'s S_IS* macros rather than S_IF*
o [r]index -> str[r]chr
o convert some static buffers to dynamic ones
o use real tempfiles rather than reopening the same templates
o rename some functions that clash with libc
o convert wait_status from union to int and use wait(2) status macros
o fix multiple potential buffer overflows
o fix a few comments
o add $FreeBSD$

Reviewed by: nra, nectar (earlier version)


73233 28-Feb-2001 ru

Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


71107 16-Jan-2001 ru

mdoc(7) police: fixed broken references.


70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


69351 29-Nov-2000 ru

Eliminate groff(1) warnings.


69249 27-Nov-2000 kris

*** empty log message ***


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


67496 24-Oct-2000 phk

Add $FreeBSD$

Rename local offsetof() macro to boffsetof() to avoid clashing with
the offsetof() from <stddef.h>


64618 13-Aug-2000 gshapiro

Complete migration of aliases file to /etc/mail/aliases.
The maintainers of share/examples/diskless/README.TEMPLATING and mergemaster
have been contacted so those may be updated as well.


59217 14-Apr-2000 imp

#include <errno.h> where needed. Kill extern int errno;.

Minor warnings in tip corrected.


57670 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


52989 08-Nov-1999 jkoshy

Document startup behaviour of mail(1).

PR: docs/1577
Submitted by: Joseph Koshy <koshy@india.hp.com>


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


47346 20-May-1999 jmz

Ignore the MAIL environment variable when the -u flag is set.

PR: bin/8665


42625 13-Jan-1999 simokawa

Allocate aligned memory according to sizeof(char *).

Approved by: jkh
Obtained from: NetBSD


40189 10-Oct-1998 bde

vfork -> fork. The child calls abort(), which calls stdio.


40188 10-Oct-1998 bde

vfork -> fork. This home made popen() had the same bug as the library
popen(), but worse. The child calls execvp(), which calls malloc()
a bit more than execl(), and it calls non-library functions that call
malloc() and who-knows-what else (stdio is called in at least some
error cases).


40187 10-Oct-1998 bde

Fixed gross breakage in previous commit. The malloc sizes for the
temporary file names were uninitialized if TMPDIR was set and 1 too
small otherwise.

Fixed style bugs in previous commit.

Fixed missing checks for malloc failure in previous commit.

Report malloc failure consistently, at least in temp.c.


40186 10-Oct-1998 bde

Removed debugging cruft.

Broken in: previous commit


40171 10-Oct-1998 thepish

PR: bin/8250
protect against buffer overruns in mail temporary files.


38678 31-Aug-1998 jkoshy

Move setting of 'crt' mail variable to {/usr/src}/etc/mail.rc.


37453 06-Jul-1998 bde

Fixed printf format errors.


35184 14-Apr-1998 steve

Document the use of sendmail options on the commandline.

PR: 4778
Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>


32234 04-Jan-1998 joerg

Fix a style bug, and a real bug (&& vs. & misused).

Submitted by: bde


32189 02-Jan-1998 joerg

Teach boring old mail(1) about the use of the REPLYTO environment
variable which is de-facto standard for MUAs.

Teach bomail to generate an in-reply-to header so threading MUAs and
mail->news gateways won't lose context.

While i was at it, removed two gratuitous standard violations for
functions starting with an underscore.


30878 01-Nov-1997 jraynard

Balance parentheses around command abbreviations.
PR: 4888
Submitted by: h-nokubi@nmit.tmg.nec.co.jp


29574 18-Sep-1997 phk

Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>


28969 31-Aug-1997 wosch

Fix file names.


28241 15-Aug-1997 wosch

make install should not install mail.rc in /etc


27643 24-Jul-1997 charnier

Use err(3).


24932 14-Apr-1997 bde

Renamed undelete() to undelete_messages() to avoid conflict with new
undelete() syscall.

Submitted by: partly by roberto


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21703 15-Jan-1997 mpp

Document the "more" command.

Submitted by: Julian Coleman <j.d.coleman@ncl.ac.uk>
Obtained from: NetBSD-bugs PR# 3104


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


20778 21-Dec-1996 jkh

Allow mail(1) to look for multiple mail.rc files.
Submitted-By: Lyndon Nerenberg VE7TCP <lyndon@orthanc.com>


18726 06-Oct-1996 jkh

Honor the MAIL environment variable.
Submitted-By: Dan Cross <cross@math.psu.edu>


18532 28-Sep-1996 bde

Eliminated NOFILE. Use the arbitrary (currently identical) limit of 64
instead (for the input stack size).

`mail' was one of the 3 programs in /usr/src that (mis)used NOFILE.


17891 29-Aug-1996 wosch

[HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41


17678 19-Aug-1996 peter

Simplistic conversion of mail to use termios instead of sgtty.


15073 06-Apr-1996 mpp

Correct some cross references and some path names.


13837 02-Feb-1996 wosch

filenames corrected


13744 30-Jan-1996 mpp

Fix a bunch of spelling errors in a bunch of man pages.


12431 20-Nov-1995 markm

Correct the man pages, USD doc and online help to refer to /var/mail
instead of {usr|var}/spool/mail


10067 15-Aug-1995 joerg

'#' is not a comment if a non-space char follow

Closes PR # bin/657: mail(1): comments in ~/.ma...

Submitted by: wosch@cs.tu-berlin.de (Wolfram Schneider)


9701 25-Jul-1995 bde

Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.


8874 30-May-1995 rgrimes

Remove trailing whitespace.


8470 12-May-1995 ache

Remove -R from CFLAGS


8387 09-May-1995 ache

Fix line-count overflow, close PR 351
Submitted by: Edward Wang <edward@edcom.com>


7605 03-Apr-1995 nate

This is the 90's, ask the user for a Subject by default when sending mail.


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.