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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
#! /usr/bin/perl -w
# $Cambridge: exim/doc/doc-docbook/x2man,v 1.7 2007/01/23 12:13:50 ph10 Exp $
# Script to find the command line options in the DocBook source of the Exim
# spec, and turn them into a man page, because people like that.
##################################################
# Main Program #
##################################################
open(IN, "spec.xml") || die "Can't open spec.xml\n";
open(OUT, ">exim.8" ) || die "Can't open exim.8\n";
print OUT <<End;
.TH EXIM 8
.SH NAME
exim \\- a Mail Transfer Agent
.SH SYNOPSIS
.nf
.B exim [options] arguments ...
.B mailq [options] arguments ...
.B rsmtp [options] arguments ...
.B rmail [options] arguments ...
.B runq [options] arguments ...
.B newaliases [options] arguments ...
.fi
.
.SH DESCRIPTION
.rs
.sp
Exim is a mail transfer agent (MTA) developed at the University of Cambridge.
It is a large program with very many facilities. For a full specification, see
the reference manual. This man page contains only a description of the command
line options. It has been automatically generated from the reference manual
source, hopefully without too much mangling.
.P
Like other MTAs, Exim replaces Sendmail, and is normally called by user agents
(MUAs) using the path \\fI/usr/sbin/sendmail\\fP when they submit messages for
delivery (some operating systems use \\fI/usr/lib/sendmail\\fP). This path is
normally set up as a symbolic link to the Exim binary. It may also be used by
boot scripts to start the Exim daemon. Many of Exim's command line options are
compatible with Sendmail so that it can act as a drop-in replacement.
.
.SH "DEFAULT ACTION"
.rs
.sp
If no options are present that require a specific action (such as starting the
daemon or a queue runner, testing an address, receiving a message in a specific
format, or listing the queue), and there are no arguments on the command line,
Exim outputs a brief message about itself and exits.
.sp
However, if there is at least one command line argument, \\fB-bm\\fR (accept a
local message on the standard input, with the arguments specifying the
recipients) is assumed. Thus, for example, if Exim is installed in
\\fI/usr/sbin\\fP, you can send a message from the command line like this:
.sp
/usr/sbin/exim -i <recipient-address(es)>
<message content, including all the header lines>
CTRL-D
.sp
The \\fB-i\\fP option prevents a line containing just a dot from terminating
the message. Only an end-of-file (generated by typing CTRL-D if the input is
from a terminal) does so.
.
.SH "SETTING OPTIONS BY PROGRAM NAME"
.rs
.sp
If an Exim binary is called using one of the names listed in this section
(typically via a symbolic link), certain options are assumed.
.TP
\\fBmailq\\fR
Behave as if the option \\fB\\-bp\\fP were present before any other options.
The \\fB\\-bp\\fP option requests a listing of the contents of the mail queue
on the standard output.
.TP
\\fBrsmtp\\fR
Behaves as if the option \\fB\\-bS\\fP were present before any other options,
for compatibility with Smail. The \\fB\\-bS\\fP option is used for reading in a
number of messages in batched SMTP format.
.TP
\\fBrmail\\fR
Behave as if the \\fB\\-i\\fP and \\fB\\-oee\\fP options were present before
any other options, for compatibility with Smail. The name \\fBrmail\\fR is used
as an interface by some UUCP systems. The \\fB\\-i\\fP option specifies that a
dot on a line by itself does not terminate a non\\-SMTP message; \\fB\\-oee\\fP
requests that errors detected in non\\-SMTP messages be reported by emailing
the sender.
.TP
\\fBrunq\\fR
Behave as if the option \\fB\\-q\\fP were present before any other options, for
compatibility with Smail. The \\fB\\-q\\fP option causes a single queue runner
process to be started. It processes the queue once, then exits.
.TP
\\fBnewaliases\\fR
Behave as if the option \\fB\\-bi\\fP were present before any other options,
for compatibility with Sendmail. This option is used for rebuilding Sendmail's
alias file. Exim does not have the concept of a single alias file, but can be
configured to run a specified command if called with the \\fB\\-bi\\fP option.
.
.SH "OPTIONS"
.rs
End
while (<IN>) { last if /^<!-- === Start of command line options === -->\s*$/; }
die "Can't find start of options\n" if ! defined $_;
$optstart = 0;
$indent = "";
# Loop for each individual option
$next = <IN>;
while ($next)
{
$_ = $next;
$next = <IN>;
last if /^<!-- === End of command line options === -->\s*$/;
# Start of new option
if (/^<term>(?=<option>-)(.*?)<\/term>$/)
{
print OUT ".TP 10\n";
$_ = "$1\n";
$optstart = 1;
}
# If a line contains text that is not in <>, read subsequent lines of the
# same form, so that we get whole sentences for matching on references.
if (/^ (?> (<[^>]+>)* ) \s*\S/x)
{
while ($next =~ /^ (?> (<[^>]+>)* ) \s*\S/x)
{
$_ .= $next;
$next = <IN>;
}
}
# Remove sentences or parenthetical comments that refer to chapters or
# sections. The order of these changes is very important:
#
# (1) Remove any parenthetical comments first.
# (2) Then remove any sentences that start after a full stop.
# (3) Then remove any sentences that start at the beginning or a newline.
s/\s?\( [^()]+ <xref \s linkend="[^"]+" \/ > \)//xg;
s/\s?\. [^.]+ <xref \s linkend="[^"]+" \/ > [^.]*? \././xg;
s/(^|\n) [^.]+ <xref \s linkend="[^"]+" \/ > [^.]*? \./$1/xg;
# Handle paragraph starts; skip the first one encountered for an option
if ($optstart && /<(sim)?para>/)
{
s/<(sim)?para>//;
$optstart = 0;
}
# Literal layout needs to be wrapped with .sp, and indented.
if (/<literallayout/)
{
s/<literallayout[^>]*>/.sp/;
$indent = " ";
}
$indent = "" if (/<\/literallayout>/);
# Others get marked
s/<para>/.sp/;
s/<simpara>/.sp/;
# Skip index entries
s/<primary>.*?<\/primary>//g;
s/<secondary>.*?<\/secondary>//g;
# Convert all occurrences of backslash into \e
s/\\/\\e/g;
# Handle bold and italic
s/<emphasis>/\\fI/g;
s/<emphasis role="bold">/\\fB/g;
s/<\/emphasis>/\\fP/g;
s/<option>/\\fB/g;
s/<\/option>/\\fP/g;
s/<varname>/\\fI/g;
s/<\/varname>/\\fP/g;
# Handle quotes
s/<\/?quote>/"/g;
# Remove any remaining XML markup
s/<[^>]*>//g;
# If nothing left in the line, ignore.
next if /^\s*$/;
# We are going to output some data; sort out special characters
s/</</g;
s/>/>/g;
s/ / /g;
s/–/-/g;
s/’/'/g;
# Escape hyphens to prevent unwanted hyphenation
s/-/\\-/g;
# Put in the indent unless the line starts .sp, and then write the line
s/^/$indent/mg unless /^\.sp/;
print OUT;
}
print OUT <<End;
.
.SH "SEE ALSO"
.rs
.sp
The full Exim specification, the Exim book, and the Exim wiki.
End
# End of x2man
|