Commit Graph

165 Commits

Author SHA1 Message Date
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
charnier
d91692bf4c Add __unused. Ansi prototypes. 2010-12-19 14:18:07 +00:00
joel
29af67e52c 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
2010-12-11 08:32:16 +00:00
uqs
9242c645f8 Move most of the remaining USD/PSD/SMM papers into share/doc 2010-12-04 10:11:20 +00:00
uqs
2053f035e3 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
2010-05-27 12:59:49 +00:00
ed
543b5e901b 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.
2010-03-28 13:16:08 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
ed
0de38335a4 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
2009-01-16 15:00:30 +00:00
dds
5ea072fa21 Use static storage-class specifier where appropriate.
Found by: CScout
2007-11-08 11:13:03 +00:00
dds
bb2ff1033f Make function's definition follow its declared visibility.
Found by: CScout
2007-11-08 09:09:02 +00:00
maxim
f608810850 o Really commit typo fixes to HEAD.
PR:		docs/110809
Submitted by:	naddy
2007-03-25 18:37:59 +00:00
dds
8a7716f761 Document the TMPDIR environment variable.
MFC after:	1 week
2006-01-05 10:19:42 +00:00
yar
e5de7a52cb Sync usage screen with manpage.
MFC after:	5 days
2005-10-07 10:18:44 +00:00
yar
481c4ecdb9 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
2005-10-07 10:16:41 +00:00
cperciva
afe2192571 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.
2005-08-17 15:56:04 +00:00
ru
7ef60504e6 Bumped document date.
Dealt with hard sentence breaks and whitespace at EOL.
2004-05-19 09:51:31 +00:00
mikeh
39dab43424 These aren't all binary options. 2004-03-09 01:20:24 +00:00
mikeh
97dc367f93 Assign checkmode boolean earlier to handle the goto jump.
Might fix PR bin/63769.
2004-03-06 13:27:59 +00:00
mikeh
9d29f488ff 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
2004-02-29 20:44:44 +00:00
trhodes
9b883f99f1 Remove 2 more unused doc Makefiles. 2003-02-04 18:26:08 +00:00
mikeh
44c0edb0a0 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
2003-01-09 05:08:37 +00:00
mikeh
f4872a600d Correct a few more definitions, capitalize header fields consistently. 2003-01-09 03:36:47 +00:00
mikeh
8234c83805 Clarify ~. escape definition, remove duplicate entry, and shorten a
definition.
2003-01-09 01:14:54 +00:00
mikeh
139f1ec4fa Document the ~. and ~? command escapes. 2003-01-09 01:08:33 +00:00
charnier
7dd9d47059 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
ru
a8adf98c82 Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
ru
cd7c90d38f s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
mikeh
034b3aea2d Add support for the 'flipr' option per IEEE 1003.1-2001. 2002-06-25 05:34:27 +00:00
mikeh
94e2e299e4 Use strcasestr() instead of reimplementing it. 2002-06-25 05:28:32 +00:00
mikeh
92912abb16 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.
2002-06-25 05:24:30 +00:00
mikeh
289920516b 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
2002-06-25 05:16:11 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
imp
1698cb216e remove __P 2002-03-22 01:33:25 +00:00
bde
1108cb5744 #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.
2002-02-25 05:16:22 +00:00
markm
31d81e4fbc Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
charnier
0292afe82d Show arguments of command line options
Reviewed by:	ru
2002-01-22 19:49:48 +00:00
mikeh
774dd0c9ef Link mail(1) to mailx per POSIX. Mail(1) isn't 100% POSIX compliant,
but it is pretty close.

Not objected to by: -standards
2002-01-19 23:47:21 +00:00
ru
873c69d70d mdoc(7) police: oops, forgot about those interim XXX'es. 2002-01-10 14:27:04 +00:00
ru
dfa717614b mdoc(7) police: tidy up. 2002-01-10 14:25:34 +00:00
mikeh
b2975fd8e9 Fix comment. 2001-12-23 06:12:41 +00:00
mikeh
45093b4f56 Add support for ~_, ~x, ~i, ~a, ~A, ~<, and ~r! tilde-escapes. Improve
tilde-escapes documentation.

Mostly obtained from:	NetBSD
2001-12-22 22:16:48 +00:00
ache
3e366cfcab Add missing {} to 'for'. It fix coredump (result of NetBSD changes merge) 2001-12-19 22:25:11 +00:00
ache
8d59503ab2 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.
2001-12-19 21:50:22 +00:00
mikeh
e4034fe298 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
2001-12-18 20:52:09 +00:00
ru
7ed2dfe749 Install files via FILES. 2001-12-17 16:02:15 +00:00
mikeh
ceaaa7f6f5 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$.
2001-12-12 15:42:19 +00:00
mikeh
ff0ca8acbc 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
2001-09-23 04:07:26 +00:00
ache
0bff53b958 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.
2001-09-02 14:40:51 +00:00
brian
5bd90784a6 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 14:46:40 +00:00
ru
95ce4d2cdc Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
ru
80f060f0cf mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
36f138439b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
b34776a031 mdoc(7) police: fixed formatting bugs in rev. 1.27. 2001-07-05 06:27:52 +00:00
mikeh
e65f95daf3 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
2001-06-28 02:40:07 +00:00
dd
7894e59b7f Nuke unused variables. 2001-06-24 23:41:57 +00:00
mikeh
016a180889 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
2001-06-18 04:28:03 +00:00
mikeh
3979a82a11 Respect REPLYTO in mailrc.
PR:		bin/8322
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
MFC after:	2 weeks
2001-06-14 01:08:30 +00:00
mikeh
aa40e2eac7 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)
2001-05-27 20:26:22 +00:00
mikeh
0746a554bf 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
2001-05-11 03:07:11 +00:00
mikeh
e51e7e067d 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)
2001-03-25 04:57:05 +00:00
ru
f4325cbb8b Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
ru
1476a16d46 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
ru
e6cfc0711d Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
f3e5889750 Eliminate groff(1) warnings. 2000-11-29 10:56:59 +00:00
kris
bea660926e *** empty log message *** 2000-11-27 06:55:38 +00:00
ru
0d1334ca0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
ru
a6f5d950d8 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
phk
520b5dea3b Add $FreeBSD$
Rename local offsetof() macro to boffsetof() to avoid clashing with
the offsetof() from <stddef.h>
2000-10-24 13:54:31 +00:00
gshapiro
2424c7393a 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.
2000-08-13 18:38:58 +00:00
imp
4721d7ef43 #include <errno.h> where needed. Kill extern int errno;.
Minor warnings in tip corrected.
2000-04-14 06:39:19 +00:00
sheldonh
49c4458c80 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.
2000-03-01 12:20:22 +00:00
jkoshy
8d9b08ce74 Document startup behaviour of mail(1).
PR:		docs/1577
Submitted by:	Joseph Koshy <koshy@india.hp.com>
1999-11-08 03:54:37 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
jmz
b75649d2ee Ignore the MAIL environment variable when the -u flag is set.
PR:		bin/8665
1999-05-20 22:23:04 +00:00
simokawa
2373cd9b47 Allocate aligned memory according to sizeof(char *).
Approved by: jkh
Obtained from: NetBSD
1999-01-13 10:37:22 +00:00
bde
b350ac99ac vfork -> fork. The child calls abort(), which calls stdio. 1998-10-10 19:21:39 +00:00
bde
7a03a3002a 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).
1998-10-10 19:18:30 +00:00
bde
0d02aaceb9 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.
1998-10-10 19:01:47 +00:00
bde
e528e28bfe Removed debugging cruft.
Broken in:	previous commit
1998-10-10 18:37:02 +00:00
thepish
baece423c7 PR: bin/8250
protect against buffer overruns in mail temporary files.
1998-10-10 09:58:20 +00:00
jkoshy
10ca2e7bc7 Move setting of 'crt' mail variable to {/usr/src}/etc/mail.rc. 1998-08-31 10:53:06 +00:00
bde
0609531ab6 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
steve
c056e50072 Document the use of sendmail options on the commandline.
PR:		4778
Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1998-04-14 00:59:29 +00:00
joerg
0a88d1dcf1 Fix a style bug, and a real bug (&& vs. & misused).
Submitted by:	bde
1998-01-04 10:08:26 +00:00
joerg
00289accda 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.
1998-01-02 16:44:13 +00:00
jraynard
154d1d7db2 Balance parentheses around command abbreviations.
PR:			4888
Submitted by:	h-nokubi@nmit.tmg.nec.co.jp
1997-11-01 00:56:15 +00:00
phk
d8ac409160 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>
1997-09-18 14:08:40 +00:00
wosch
33086c126b Fix file names. 1997-08-31 21:33:27 +00:00
wosch
812d6fd9cc make install should not install mail.rc in /etc 1997-08-15 21:50:02 +00:00
charnier
2df2878db2 Use err(3). 1997-07-24 06:56:33 +00:00
bde
9333dd8df4 Renamed undelete() to undelete_messages() to avoid conflict with new
undelete() syscall.

Submitted by:	partly by roberto
1997-04-14 16:49:30 +00:00
imp
141381e1cb compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
mpp
731f1f957c Document the "more" command.
Submitted by:	Julian Coleman <j.d.coleman@ncl.ac.uk>
Obtained from:  NetBSD-bugs PR# 3104
1997-01-15 04:44:08 +00:00
jkh
808a36ef65 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.
1997-01-14 07:20:47 +00:00
jkh
ad3a46d18b Allow mail(1) to look for multiple mail.rc files.
Submitted-By: Lyndon Nerenberg VE7TCP <lyndon@orthanc.com>
1996-12-21 22:53:58 +00:00