1MAILPOST(8)               InterNetNews Documentation               MAILPOST(8)
2
3
4

NAME

6       mailpost - Feed an e-mail message into a newsgroup
7

SYNOPSIS

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] [-t
11       tempdir] [-x header[:header...]] [-z header[:header...]]  newsgroups
12

DESCRIPTION

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 header fields (cleans up some
21       address headers, removes a few ones like X-Complaints-To: and X-Trace:,
22       and puts "X-" in front of unknown header fields).  The Received: and
23       *-To: header fields are also altered to prevent spamming the gateway
24       (the name of the news server or the domain name from inn.conf are
25       removed).
26
27       If the article has been seen before (mailpost records the message-ID of
28       each article it handles), then the article will be dropped with a non-
29       zero error status.  Other errors will cause the article to be mailed to
30       the newsmaster (selected at configure time and defaulting to "usenet").
31
32       Normally, mailpost is run by sendmail(8) via an alias entry:
33
34           local-mail-wreck-bikes: "|<pathbin in inn.conf>/mailpost
35               -b /var/tmp -t /var/tmp -d local local.mail.rec.bicycles.racing"
36
37       The -b and -t flags are useful to change the directories used by
38       mailpost by default.  As a matter of fact, though it is recommended to
39       run mailpost as the news user, it is as often as not run as another
40       user, for instance the mail user.  Therefore, you should make sure to
41       create and set to be writable by the user that mailpost runs as the
42       directories where to put the database and the temporary files.
43
44       Instead of /var/tmp, the mail spool directory can be specified, or any
45       other directory where the mailpost process has write access.
46

OPTIONS

48       -a addr
49           If the -a flag is used, the value given is added to the article as
50           an Approved: header.
51
52       -b database
53           If the -b flag is used, then it defines the location of the
54           persistent database used to store the message-IDs of articles sent
55           on.  This is to prevent articles looping around if a news-to-mail
56           gateway sends them back here.  This option may be required if the
57           mailpost process does not have write access to the news database
58           directory.  The default value is pathdb as set in inn.conf.
59
60       -c wait-time
61           The -c flag indicates a length of time to sleep before posting.  If
62           duplicate messages are received in this interval (by any instance
63           of mailpost using the same database), the article is only posted
64           once, but with Newsgroups: header modified to crosspost the article
65           to all indicated groups.  The units for wait-time are seconds; a
66           reasonable value may be anywhere from tens to hundreds of seconds,
67           or even higher, depending on how long mail can be delayed on its
68           way to your system.
69
70       -d distribution
71           If the -d flag is used, the value given is added to the article as
72           a Distribution: header.
73
74       -f addr
75           The -f flag is a synonym for the -r flag.
76
77       -h  Print usage information and exit.
78
79       -m mailing-list
80           If the -m flag is used, the value given is added to the article in
81           a Mailing-List: header, if such a header doesn't already exist.
82
83       -n  If the -n flag is used, neither an article is posted nor a mail is
84           sent in case an error occurs.  Everything is written to the
85           standard output.
86
87       -o output-command
88           Specifies the program to which the resulting article processed by
89           mailpost should be sent.  For debugging purpose, "-o cat" can be
90           used.  The default value is "inews -S -h".
91
92       -p port
93           Specifies the port on which nnrpd is listening, used for article
94           posting.  If given, -p is passed along to inews.
95
96       -r addr
97           A heuristic is used to determine a reasonable value for the Path:
98           header.  The -r flag indicates what to use if no other value can be
99           determined.
100
101       -t tempdir
102           If the -t flag is used, then it defines the location of the
103           directory to use to temporarily store error messages that are sent
104           to the newsmaster.  This option may be required if the default
105           value refers to a path that does not exist or the mailpost process
106           does not have write access to.  Two paths are tried by default:
107           pathtmp as set in inn.conf, and then /var/tmp if pathtmp is not
108           writable.
109
110       -x header[:header...]
111           A colon-separated list of additional header fields which should be
112           treated as known header fields; these header fields will be passed
113           through to inews without having "X-" prepended.
114
115           Known header fields are:
116
117               Archive
118               Archived-At
119               Comments
120               Content-*
121               Date
122               Distribution
123               From
124               Injection-Date
125               Keywords
126               Mailing-List
127               Message-ID
128               MIME-*
129               Organization
130               References
131               Return-Path
132               Sender
133               Subject
134               Summary
135
136       -z header[:header...]
137           A colon-separated list of additional header fields which should be
138           removed.
139
140           Removed header fields are:
141
142               X-Trace
143               X-Complaints-To
144

FILES

146       pathbin/mailpost
147           The Perl script itself used to feed an e-mail message to a
148           newsgroup.
149
150       pathdb/mailpost-msgid.dir and pathdb/mailpost-msgid.pag
151           The default database files which record previously seen message-
152           IDs.
153

HISTORY

155       Written by Paul Vixie long ago and then hacked up by James Brister for
156       INN integration.
157
158       $Id: mailpost.in 10171 2017-07-22 14:01:37Z iulius $
159

SEE ALSO

161       active(5), inews(1), inn.conf(5), nnrpd(8), uwildmat(3).
162
163
164
165INN 2.6.4                         2018-01-28                       MAILPOST(8)
Impressum