1MAILPOST(8) InterNetNews Documentation MAILPOST(8)
2
3
4
6 mailpost - Feed an e-mail message into a newsgroup
7
9 mailpost [-hn] [-a addr] [-b database] [-c wait-time] [-d distribution]
10 [-f addr] [-m mailing-list] [-o output-command] [-p port] [-r addr] [-x
11 header[:header...]] newsgroups
12
14 The mailpost program reads a properly formatted e-mail message from
15 stdin and feeds it to inews for posting to a news server. newsgroups
16 is a whitespace-separated list of group names to which to post the
17 article (at least one newsgroup must be specified).
18
19 Before feeding the article to inews, it checks that the article has not
20 been seen before, and it changes some headers (cleans up some address
21 headers, removes X-Trace: and X-Complaints-To:, and puts "X-" in front
22 of unknown headers).
23
24 If the article has been seen before (mailpost records the Message-ID of
25 each article it handles), then the article will be dropped with a non-
26 zero error status. Other errors will cause the article to be mailed to
27 the newsmaster (selected at configure time and defaulting to "usenet").
28
29 Normally, mailpost is run by sendmail(8) via an alias entry:
30
31 local-mail-wreck-bikes: "|<pathbin in inn.conf>/mailpost
32 -b /var/tmp -d local local.mail.rec.bicycles.racing"
33
34 Instead of /var/tmp, the mail spool directory can be specified, or any
35 other directory where the mailpost process has write access.
36
38 -a addr
39 If the -a flag is used, the value given is added to the article as
40 an Approved: header.
41
42 -b database
43 If the -b flag is used, then it defines the location of the
44 database used to store the Message-IDs of articles sent on. This
45 is to prevent articles looping around if a news-to-mail gateway
46 sends them back here. This option may be required if the mailpost
47 process does not have write access to the news temporary directory.
48 The default value is pathtmp as set in inn.conf.
49
50 -c wait-time
51 The -c flag indicates a length of time to sleep before posting. If
52 duplicate messages are received in this interval (by any instance
53 of mailpost using the same database), the article is only posted
54 once, but with Newsgroups: header modified to crosspost the article
55 to all indicated groups. The units for wait-time are seconds; a
56 reasonable value may be anywhere from tens to hundreds of seconds,
57 or even higher, depending on how long mail can be delayed on its
58 way to your system.
59
60 -d distribution
61 If the -d flag is used, the value given is added to the article as
62 a Distribution: header.
63
64 -f addr
65 The -f flag is a synonym for the -r flag.
66
67 -h Print usage information and exit.
68
69 -m mailing-list
70 If the -m flag is used, the value given is added to the article in
71 a Mailing-List: header, if such a header doesn't already exist.
72
73 -n If the -n flag is used, neither an article is posted nor a mail is
74 sent in case an error occurs. Everything is written to the
75 standard output.
76
77 -o output-command
78 Specifies the program to which the resulting article processed by
79 mailpost should be sent. For debugging purpose, "-o cat" can be
80 used. The default value is "inews -S -h".
81
82 -p port
83 Specifies the port on which nnrpd is listening, used for article
84 posting. If given, -p is passed along to inews.
85
86 -r addr
87 A heuristic is used to determine a reasonable value for the Path:
88 header. The -r flag indicates what to use if no other value can be
89 determined.
90
91 -x header[:header...]
92 A colon-separated list of additional headers which should be
93 treated as known headers; these headers will be passed through to
94 inews without having "X-" prepended.
95
96 Known headers are:
97
98 Approved
99 Content-*
100 Date
101 Distribution
102 From
103 Mailing-List
104 Message-ID
105 MIME-*
106 References
107 Return-Path
108 Sender
109 Subject
110
112 pathbin/mailpost
113 The Perl script itself used to feed an e-mail message to a
114 newsgroup.
115
116 pathtmp/mailpost-msgid.dir and pathtmp/mailpost-msgid.pag
117 The default database files which record previously seen Message-
118 IDs.
119
121 Written by Paul Vixie long ago and then hacked up by James Brister for
122 INN integration.
123
124 $Id: mailpost.in 9025 2010-03-21 16:49:41Z iulius $
125
127 active(5), inews(1), inn.conf(5), nnrpd(8), uwildmat(3).
128
129
130
131INN 2.5.2 2010-03-21 MAILPOST(8)