aboutsummaryrefslogtreecommitdiff
path: root/alck.1
blob: 6e842aecc8ce9335d11a77dd555504e25bcf484c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.\" This file is part of ALCK -*- nroff -*-
.\" Copyright (C) 2013 Sergey Poznyakoff
.\"
.\" Alck is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3, or (at your option)
.\" any later version.
.\"
.\" Alck is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Alck.  If not, see <http://www.gnu.org/licenses/>.
.TH ALCK 1 "March 5, 2013" "ALCK"
.SH NAME
alck \- check MTA alias files
.SH SYNOPSIS
\fBalck\fR [\fB\-d\fR \fILEVEL\fR] [\fB\-T\fR \fIFILE\fR]\
 [\-\fBruv\fR] [\fB\-w\fR \fIFILE\fR] \fIFILE\fR
.sp
\fBalck\fR \fB\-h\fR
.sp
\fBalck\fR \fB\-V\fR
.SH DESCRIPTION
.B Alck
checks one or several
.BR sendmail -style
alias files for consistency.  The following tests are performed:
.TP
.B Transitivity test
This test discovers eventual circular dependencies.
.TP
.B Use of prohibited aliases
.PP
The program returns 0 if all tests pass successfully. Otherwise,
it diagnoses encountered problems and exits with error code 1.
.PP
The program takes a list of alias files to be checked from its command
line.  Command line options can be interspersed with filename
arguments.  The command line option
.B \-T
can be used to read the list of file names from a plain-text file.
Such a file must contain one file name per line.  Empty lines and
lines beginning with
.B #
are ignored.  Any file name that does not begin with a
.B /
is searched in the same directory where the list file resides.  For
example, assuming that the file
.B /etc/mailman/LIST contains:
.sp
.nf
.in +2
mailman
mailman-test
.in
.fi
.sp
the following invocation
.sp
.nf
.in +2
$ alck /etc/mail/aliases -T/etc/mailman/LIST
.in
.fi
.sp
would instruct
.B alck
to process files
.BR /etc/mail/aliases ,
.B /etc/mailman/mailman
and
.BR /etc/mailman/mailman-test ,
in that order.
.PP
In any case, if several alias files are supplied,
.B alck
treats them as parts of a single alias file.
.SH OPTIONS
.TP
\fB\-d\fR \fISPEC\fR
Set debug level.  The \fISPEC\fR can contain one or more of the
following letters:
.RS
.TP
.B y
enable parser debugging;
.TP
.BR l " (the letter " ell ")"
enable lexical analizer debugging.
.RE
.sp
Upper-case variants are also accepted.  Prepending a letter with
a dash (\fB\-\fR) reverts its sense.
.TP
\fB\-T\fR \fIFILE\fR
Read names of alias files from \fIFILE\fR.
.TP
.B \-r
By default, the program allows any valid
.B Sendmail
constructs in its input files.  To restrict the input syntax to plain
aliases only, i.e. to prohibit the use of pipes and file redirections, use
the \fB\-r\fR option.  This option affects all file names following
it, until the eventual occurrence of the
.B \-u
option or the end of command line.
.TP
.B \-u
This options cancels the effect of the previous
.B \-r
option.
.TP
.B \-v
Verbosely report the results.
.TP
\fB\-w\fR \fIFILE\fR
Read contents of the
.BR Sendmail 's
.B w
class from the given
.IR FILE .
.PP
The following two options instruct the program to display a certain
kind of information and exit:
.TP
.B \-h
Display a terse help summary.
.TP
.B \-V
Display the program version and copyright statement.
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
Report bugs to <gray@gnu.org>.
.SH COPYRIGHT
Copyright \(co 2013 Sergey Poznyakoff
.br
.na
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
.ad
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.\" Local variables:
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.-]* [0-9] \""
.\" time-stamp-format: "%:B %:d, %:y"
.\" time-stamp-end: "\""
.\" time-stamp-line-limit: 20
.\" end:


Return to:

Send suggestions and report system problems to the System administrator.