| MAILPOST(8) | InterNetNews Documentation | MAILPOST(8) |
mailpost - Feed an e-mail message into a newsgroup
mailpost [-hn] [-a addr] [-b database] [-c wait-time] [-d distribution] [-f addr] [-m mailing-list] [-o output-command] [-p port] [-r addr] [-t tempdir] [-x header[:header...]] [-z header[:header...]] newsgroups
The mailpost program reads a properly formatted e-mail message from stdin and feeds it to inews for posting to a news server. newsgroups is a whitespace-separated list of group names to which to post the article (at least one newsgroup must be specified).
Before feeding the article to inews, it checks that the article has not been seen before, and it changes some header fields (cleans up some address headers, removes a few ones like X-Complaints-To: and X-Trace:, and puts "X-" in front of unknown header fields). The Received: and *-To: header fields are also altered to prevent spamming the gateway (the name of the news server or the domain name from inn.conf are removed).
If the article has been seen before (mailpost records the message-ID of each article it handles), then the article will be dropped with a non-zero error status. Other errors will cause the article to be mailed to the newsmaster (selected at configure time and defaulting to "usenet").
Normally, mailpost is run by sendmail(8) via an alias entry:
local-mail-wreck-bikes: "|<pathbin in inn.conf>/mailpost
-b /var/tmp -t /var/tmp -d local local.mail.rec.bicycles.racing"
The -b and -t flags are useful to change the directories used by mailpost by default. As a matter of fact, though it is recommended to run mailpost as the news user, it is as often as not run as another user, for instance the mail user. Therefore, you should make sure to create and set to be writable by the user that mailpost runs as the directories where to put the database and the temporary files.
Instead of /var/tmp, the mail spool directory can be specified, or any other directory where the mailpost process has write access.
Known header fields are:
Archive
Archived-At
Comments
Content-*
Date
Distribution
From
Injection-Date
Keywords
Mailing-List
Message-ID
MIME-*
Organization
References
Return-Path
Sender
Subject
Summary
Removed header fields are:
X-Trace
X-Complaints-To
Written by Paul Vixie long ago and then hacked up by James Brister for INN integration.
$Id: mailpost.in 10171 2017-07-22 14:01:37Z iulius $
| 2018-01-28 | INN 2.6.4 |