The sendmail
distribution comes complete with
several companion programs that can help you use
sendmail
.
Beginning with V8.13, sendmail
offers expanded
output for one program and new command-line switches for a couple of
others:
A new mailstats
display (Section 5.1.1[V8.13]) includes
a
count of quarantined messages.
A new makemap
-D
command-line
switch (Section 5.1.2[V8.13])
allows
you to define an alternative to #
as a comment
character.
A new vacation
-j
command-line
switch
(Section 5.1.3
[V8.13])
allows vacation
to respond to messages, even if
a user’s name does not appear in a
To
: or Cc
: header.
A new vacation
-R
command-line
switch
(Section 5.1.4
[V8.13])
allows you to redefine the envelope-sender address from
<>
to one of your own choice.
As of V8.13, sendmail can
quarantine messages based on the sender
address so that they may be reviewed before being sent (Section 11.1.2
[V8.13]). The
sendmail
program keeps track of the number of
messages quarantined by updating the information in
the
statistics
file
(24.9.106[3ed]), while the
mailstats program
(5.4[3ed]) summarizes that information.
Prior to V8.13, the output produced by mailstats
ended with the column that displayed the number of discarded messages
(the msgsdis
column). Beginning with V8.13, a new
rightmost column has been added (called msgsqur
)
that shows the number of messages that have been quarantined:
# mailstats
Statistics from Sun Apr 6 09:47:44 2003
M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis msgsqur Mailer
0 0 0K 15544 46975K 0 0 0 prog
3 678 9590K 0 0K 62 0 0 local
5 21430 264395K 1055 2082K 12969 0 0 esmtp
=====================================================================
T 22108 273985K 16599 49057K 13031 0 0
C 28551 1980 13031
The msgsqur
column shows the number of messages
(envelopes), if any, that have been quarantined since the
statistics
was cleared.
If you upgrade mailstats
to V8.13 before you
upgrade sendmail
, mailstats
will produce the following error when run:
mailstats version (4) incompatible with /etc/mail/statistics version (3)
Normally, the makemap
program (5.5[3ed])
ignores
lines of input that begin with the #
character,
but this can cause problems because some files use a different
comment character. The dig
(1) program, for
example, produces output that uses a semicolon as the comment
character:
;; ANSWERS: host.domain.com 1845 CNAME domain.com
To satisfy the need to build database-map files from such input, the
-D
command-line switch has been added to the
makemap
program. When you run
makemap
with the -D
command-line switch, makemap
will ignore lines
of input that begin with a semicolon.
% file.db
Note that, we prefix the semicolon with a backslash to insulate it from interpretation by the shell.
Ordinarily, the vacation
program (5.9[3ed]) will
only
auto-respond to messages that contain the
recipient’s address in
the To
: or
Cc
: headers. There will be instances, however,
perhaps occurring as a
result of aliasing or
~/.forward
file translation, when mail will be
delivered with an address in one of those headers that is something
other than the recipient’s address. To illustrate,
consider the following aliases
file
(12.1.1[3ed]) entries:
root: bob bin: root sys: root webmaster: root hostmaster: root
Here, the system administrator, bob
, receives mail
that is also sent to root
, bin
,
sys
, webmaster
, and
hostmaster
. Normally,
vacation
will not respond to mail sent to any of
these aliases. If bob wants
vacation
to respond even if the name
bob
is not found in the To
: or
Cc
: headers, bob may cause it to do
so by adding this -j
command-line switch to his
invocation of vacation
in his
~/.forward
file:
|"/usr/ucb/vacation -j bob"
Henceforth, vacation
will amend its recipient
check[3] response (when otherwise able) to all
messages, no matter to whom each is addressed.
But note, this switch can cause vacation
to
auto-reply to unexpected addresses so is better limited for use in
restricted environments. Instead, when you know all possible
addresses ahead of time (as you should, via the
aliases
file), use the
vacation
program’s
-a
switch
(5.9.4.1[3ed]).
There is always a chance that
a
vacation
message will bounce. To prevent that,
vacation
(5.9[3ed])
offers the -z
command-line switch
(5.9.4.13[3ed]), which sets the return
address for the message to be the null address:
<>
If you prefer a different return address, you may use the new V8.13
-R
vacation command-line
switch to define one. For example:
|"/usr/ucb/vacation -R [email protected] you"
Here, the -R
command-line switch causes
vacation to mail messages with a return address
of [email protected]. Such a
return address might be appropriate at a site that has a special
address for all bounces.
You can also use this switch to have bounces sent to yourself at a
plussed address. That way you can screen such bounces with
procmail
(1) or slocal
(1),
using a line like the following in your
~/.forward
file:
|"/usr/ucb/vacation -R [email protected] you"
[3] The vacation
program will
still follow all of its other rules (except the recipient check).
That is, it won’t respond to a
Precedence
: header of junk
or
bulk
; won’t respond to list
items; won’t respond to mail from
postmaster, uucp,
MAILER-DAEMON, mailer,
*-request, *-owner, or owner-*; and finally, won’t respond to a
sender it has already responded to (within its response
interval).
18.223.172.252