chiark / gitweb /
WIP inotify configure test
[inn-innduct.git] / doc / man / mailpost.8
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "MAILPOST 8"
132 .TH MAILPOST 8 "2008-04-26" "INN 2.4.5" "InterNetNews Documentation"
133 .SH "NAME"
134 mailpost \- Feed an e\-mail message into a newsgroup
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 \&\fBmailpost\fR [\fB\-hn\fR] [\fB\-a\fR \fIaddr\fR] [\fB\-b\fR \fIdatabase\fR] [\fB\-c\fR \fIwait-time\fR]
138 [\fB\-d\fR \fIdistribution\fR] [\fB\-f\fR \fIaddr\fR] [\fB\-m\fR \fImailing-list\fR]
139 [\fB\-o\fR \fIoutput-command\fR] [\fB\-p\fR \fIport\fR] [\fB\-r\fR \fIaddr\fR]
140 [\fB\-x\fR \fIheader\fR[\fB:\fR\fIheader\fR...]] \fInewsgroups\fR
141 .SH "DESCRIPTION"
142 .IX Header "DESCRIPTION"
143 The \fBmailpost\fR program reads a properly formatted e\-mail message from stdin
144 and feeds it to \fBinews\fR for posting to a news server.  \fInewsgroups\fR is a
145 whitespace-separated list of group names to which to post the article
146 (at least one newsgroup must be specified).
147 .PP
148 Before feeding the article to \fBinews\fR, it checks that the article has not
149 been seen before, and it changes some headers (cleans up some address
150 headers, removes X\-Trace: and X\-Complaints\-To:, and puts \f(CW\*(C`X\-\*(C'\fR in front
151 of unknown headers).
152 .PP
153 If the article has been seen before (\fBmailpost\fR records the Message-ID of
154 each article it handles), then the article will be silently dropped.  Other
155 errors will cause the article to be mailed to the newsmaster (selected
156 at configure time and defaulting to \f(CW\*(C`usenet\*(C'\fR).
157 .PP
158 Normally, \fBmailpost\fR is run by \fIsendmail\fR\|(8) via an alias entry:
159 .PP
160 .Vb 2
161 \&    local\-mail\-wreck\-bikes: "|<pathbin in inn.conf>/mailpost
162 \&        \-b /var/tmp \-d local local.mail.rec.bicycles.racing"
163 .Ve
164 .PP
165 Instead of \fI/var/tmp\fR, the mail spool directory can be specified,
166 or any other directory where the \fBmailpost\fR process has write access.
167 .SH "OPTIONS"
168 .IX Header "OPTIONS"
169 .IP "\fB\-a\fR \fIaddr\fR" 4
170 .IX Item "-a addr"
171 If the \fB\-a\fR flag is used, the value given is added to the article 
172 as an Approved: header.
173 .IP "\fB\-b\fR \fIdatabase\fR" 4
174 .IX Item "-b database"
175 If the \fB\-b\fR flag is used, then it defines the location of the database 
176 used to store the Message-IDs of articles sent on.  This is to prevent articles
177 looping around if a news-to-mail gateway sends them back here.  This option may
178 be required if the \fBmailpost\fR process does not have write access to the news
179 temporary directory.  The default value is \fIpathtmp\fR as set in \fIinn.conf\fR.
180 .IP "\fB\-c\fR \fIwait-time\fR" 4
181 .IX Item "-c wait-time"
182 The \fB\-c\fR flag indicates a length of time to sleep before posting.  If
183 duplicate messages are received in this interval (by any instance of
184 \&\fBmailpost\fR using the same database), the article is only posted once, but
185 with Newsgroups: header modified to crosspost the article to all indicated
186 groups.  The units for \fIwait-time\fR are seconds; a reasonable value may be
187 anywhere from tens to hundreds of seconds, or even higher, depending on how
188 long mail can be delayed on its way to your system.
189 .IP "\fB\-d\fR \fIdistribution\fR" 4
190 .IX Item "-d distribution"
191 If the \fB\-d\fR flag is used, the value given is added to the article as a
192 Distribution: header.
193 .IP "\fB\-f\fR \fIaddr\fR" 4
194 .IX Item "-f addr"
195 The \fB\-f\fR flag is a synonym for the \fB\-r\fR flag.
196 .IP "\fB\-h\fR" 4
197 .IX Item "-h"
198 Print usage information and exit.
199 .IP "\fB\-m\fR \fImailing-list\fR" 4
200 .IX Item "-m mailing-list"
201 If the \fB\-m\fR flag is used, the value given is added to the article in a 
202 Mailing\-List: header, if such a header doesn't already exist.
203 .IP "\fB\-n\fR" 4
204 .IX Item "-n"
205 If the \fB\-n\fR flag is used, neither an article is posted nor a mail is sent
206 in case an error occurs.  Everything is written to the standard output.
207 .IP "\fB\-o\fR \fIoutput-command\fR" 4
208 .IX Item "-o output-command"
209 Specifies the program to which the resulting article processed by \fBmailpost\fR
210 should be sent.  For debugging purpose, \f(CW\*(C`\-o cat\*(C'\fR can be used.  The default
211 value is \f(CW\*(C`inews \-S \-h\*(C'\fR.
212 .IP "\fB\-p\fR \fIport\fR" 4
213 .IX Item "-p port"
214 Specifies the port on which \fBnnrpd\fR is listening, used for article posting.
215 If given, \fB\-p\fR is passed along to \fBinews\fR.
216 .IP "\fB\-r\fR \fIaddr\fR" 4
217 .IX Item "-r addr"
218 A heuristic is used to determine a reasonable value for the Path: header.
219 The \fB\-r\fR flag indicates what to use if no other value can be determined.
220 .IP "\fB\-x\fR \fIheader\fR[\fB:\fR\fIheader\fR...]" 4
221 .IX Item "-x header[:header...]"
222 A colon-separated list of additional headers which should be treated as
223 known headers; these headers will be passed through to \fBinews\fR without
224 having \f(CW\*(C`X\-\*(C'\fR prepended.
225 .Sp
226 Known headers are:
227 .Sp
228 .Vb 12
229 \&    Approved
230 \&    Content\-*
231 \&    Date
232 \&    Distribution
233 \&    From
234 \&    Mailing\-List
235 \&    Message\-ID
236 \&    MIME\-*
237 \&    References
238 \&    Return\-Path
239 \&    Sender
240 \&    Subject
241 .Ve
242 .SH "FILES"
243 .IX Header "FILES"
244 .IP "\fIpathbin\fR/mailpost" 4
245 .IX Item "pathbin/mailpost"
246 The Perl script itself used to feed an e\-mail message to a newsgroup.
247 .IP "\fIpathtmp\fR/mailpost\-msgid.dir and \fIpathtmp\fR/mailpost\-msgid.pag" 4
248 .IX Item "pathtmp/mailpost-msgid.dir and pathtmp/mailpost-msgid.pag"
249 The default database files which record previously seen Message\-IDs.
250 .SH "HISTORY"
251 .IX Header "HISTORY"
252 Written by Paul Vixie long ago and then hacked up by James Brister for \s-1INN\s0 
253 integration.
254 .PP
255 $Id: mailpost.8 7880 2008-06-16 20:37:13Z iulius $
256 .SH "SEE ALSO"
257 .IX Header "SEE ALSO"
258 \&\fIactive\fR\|(5), \fIinews\fR\|(1), \fIinn.conf\fR\|(5), \fInnrpd\fR\|(8), \fIuwildmat\fR\|(3).