MAILPOST(8)
π MAILPOST(8) β InterNetNews Documentation, but make it group-chat π
okay so bestie, this is the manual page for mailpost, from the InterNetNews Documentation. Think of it as the little matchmaker that takes a properly formatted e-mail from stdin and hands it to inews so it can get posted to a news server. iconic behavior, honestly. π
β¨ NAME β¨
mailpost β Feed an e-mail message into a newsgroup π
π¦ SYNOPSIS π¦
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
π«Ά DESCRIPTION π«Ά
Okay here's the vibe: mailpost 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, and bestie, at least one newsgroup must be specified β no empty list, periodt.
Before it feeds the article to inews, it does a little vibe check to make sure the article hasn't been seen before, and it changes some header fields. It cleans up some address header fields, 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 β specifically, the name of the news server or the domain name set in fromhost, pathhost and domain in inn.conf are removed. π§
If the article has been seen before (yes, 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 β that's 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/spool/mailpost -t /tmp -d local local.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 β notably 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. Also, mailpost must be executable by that user. π
Instead of /var/spool/mailpost, the mail spool directory can be specified, or any other directory where the mailpost process has write access. slay. β¨
A common practice to gateway a newsgroup to a mailing-list is to create a moderated newsgroup (running for instance the command ctlinnd newgroup local.bicycles.racing m) and set the moderation address for this newsgroup in the moderators file in pathetc to the mailing-list address. If you add an -a flag in the above example, then:
- on the one hand, when a message is sent to the mailing-list,
mailpostwill be run, mark it as approved, and the message will directly reach the newsgroup. π - on the other hand, when a message is posted to the newsgroup, it normally does not have an
Approvedheader field, so it will be sent (bynnrpd) to the mailing-list address configured in themoderatorsfile, which means the message reaches the mailing-list and, like any other messages posted to the mailing-list, it will be processed bymailpost, approved, and finally reach the newsgroup. π₯
π OPTIONS π
-aaddr β If the-aflag is used, addr (which is usually the e-mail address of the poster) is added to the article as the body of anApprovedheader field. It is useful if one of the newsgroup to which the article should be posted is moderated. (Of course, this flag should be added only if you are supposed to auto-approve your posts.) Be sure that the reader connection made byinewsto post the article is allowed to post approved articles (see the"A"letter in theaccessparameter of access blocks inreaders.conf). β-bdatabase β If the-bflag is used, then it defines the location of the persistent database used to store the message-IDs of articles sent on. This is to prevent articles looping around if a news-to-mail gateway sends them back here. This option may be required if themailpostprocess does not have write access to the news database directory (notably when it is executed as the mail user). The default value ispathdbas set ininn.conf. Make sure the specified location exists and is writable by the usermailpostruns as. ποΈ-cwait-time β The-cflag indicates a length of time to sleep before posting. If duplicate messages are received in this interval (by any instance ofmailpostusing the same database), the article is only posted once, but with theNewsgroupsheader field body modified to crosspost the article to all indicated groups. The units for wait-time are seconds; a reasonable value may be anywhere from tens to hundreds of seconds, or even higher, depending on how long mail can be delayed on its way to your system. β³-ddistribution β If the-dflag is used, the value given is added to the article as the body of theDistributionheader field. π-faddr β The-fflag is a synonym for the-rflag. πͺ-hβ Print usage information and exit. π-mmailing-list β If the-mflag is used, the value given is added to the article in aList-IDheader field, if such a header field doesn't already exist. π-nβ If the-nflag is used, neither an article is posted nor a mail is sent in case an error occurs. Everything is written to the standard output. π-ooutput-command β Specifies the program to which the resulting article processed bymailpostshould be sent. For debugging purpose,-o catcan be used. The default value is"inews -S -h". π§-pport β Specifies the port on whichnnrpdis listening, used for article posting. If given,-pis passed along toinews. π-raddr β A heuristic is used to determine a reasonable value for thePathheader field body. The-rflag indicates what to use if no other value can be determined. π€οΈ-ttempdir β If the-tflag is used, then it defines the location of the directory to use to temporarily store error messages that are sent to the newsmaster. This option may be required if the default value refers to a path that does not exist or themailpostprocess does not have write access to (notably when it is executed as the mail user). Two paths are tried by default:pathtmpas set ininn.conf, and then/var/tmpifpathtmpis not writable. Make sure the specified location exists and is writable by the usermailpostruns as. π§Ή-xheader[:header...] β A colon-separated list of additional header fields which should be treated as known header fields; these header fields will be passed through toinewswithout having"X-"prepended. By default, known header fields are:
Archive
Archived-At
Comments
Content-*
Date
Distribution
From
Injection-Date
Keywords
List-ID
Message-ID
MIME-*
Organization
References
Return-Path
Sender
Subject
Summary
-zheader[:header...] β A colon-separated list of additional header fields which should be removed. By default, removed header fields are:
X-Complaints-To
X-Trace
πΈ FILES πΈ
pathbin/mailpostβ The Perl script itself used to feed an e-mail message to a newsgroup. πͺpathdb/mailpost-msgid.dirandpathdb/mailpost-msgid.pagβ The default database files which record previously seen message-IDs. ποΈ
π HISTORY π
Written by Paul Vixie long ago and then hacked up by James Brister for INN integration. Documentation improved by Julien Γlie. π
π¦ SEE ALSO π¦
inews(1), inn.conf(5), libinn_uwildmat(3), moderators(5), nnrpd(8), readers.conf(5). π
mwah π β this iconic manual page is INN 2.7.4, dated 2025-03-29. go forth and gateway, bestie π«Ά
π¦ where this page comes from
- arch rolling: inn 2.7.4-4 Β· ISC
- epel 10: inn 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms