.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MAILPOST 8" .TH MAILPOST 8 "2023-03-07" "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" mailpost \- Feed an e\-mail message into a newsgroup .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmailpost\fR [\fB\-hn\fR] [\fB\-a\fR \fIaddr\fR] [\fB\-b\fR \fIdatabase\fR] [\fB\-c\fR \fIwait-time\fR] [\fB\-d\fR \fIdistribution\fR] [\fB\-f\fR \fIaddr\fR] [\fB\-m\fR \fImailing-list\fR] [\fB\-o\fR \fIoutput-command\fR] [\fB\-p\fR \fIport\fR] [\fB\-r\fR \fIaddr\fR] [\fB\-t\fR \fItempdir\fR] [\fB\-x\fR \fIheader\fR[\fB:\fR\fIheader\fR...]] [\fB\-z\fR \fIheader\fR[\fB:\fR\fIheader\fR...]] \&\fInewsgroups\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBmailpost\fR program reads a properly formatted e\-mail message from stdin and feeds it to \fBinews\fR for posting to a news server. \fInewsgroups\fR is a whitespace-separated list of group names to which to post the article (at least one newsgroup must be specified). .PP Before feeding the article to \fBinews\fR, it checks that the article has not been seen before, and it changes some header fields (cleaning up some address header fields, removing a few ones like X\-Complaints-To and X\-Trace, and putting \f(CW\*(C`X\-\*(C'\fR 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 set in \fIfromhost\fR, \fIpathhost\fR and \&\fIdomain\fR in \fIinn.conf\fR are removed). .PP If the article has been seen before (\fBmailpost\fR 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 \f(CW\*(C`usenet\*(C'\fR). .PP Normally, \fBmailpost\fR is run by \fBsendmail\fR\|(8) via an alias entry: .PP .Vb 2 \& local\-mail\-wreck\-bikes: "|/mailpost \& \-b /var/spool/mailpost \-t /tmp \-d local local.bicycles.racing" .Ve .PP The \fB\-b\fR and \fB\-t\fR flags are useful to change the directories used by \&\fBmailpost\fR by default. As a matter of fact, though it is recommended to run \fBmailpost\fR 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 \fBmailpost\fR runs as the directories where to put the database and the temporary files. Also, \fBmailpost\fR must be executable by that user. .PP Instead of \fI/var/spool/mailpost\fR, the mail spool directory can be specified, or any other directory where the \fBmailpost\fR process has write access. .PP A common practice to gateway a newsgroup to a mailing-list is to create a moderated newsgroup (running for instance the command \f(CW\*(C`ctlinnd newgroup local.bicycles.racing m\*(C'\fR) and set the moderation address for this newsgroup in the \fImoderators\fR file in \fIpathetc\fR to the mailing-list address. If you add an \fB\-a\fR flag in the above example, then on the one hand, when a message is sent to the mailing-list, \fBmailpost\fR will 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 Approved header field, so it will be sent (by \fBnnrpd\fR) to the mailing-list address configured in the \fImoderators\fR file, which means the message reaches the mailing-list and, like any other messages posted to the mailing-list, it will be processed by \fBmailpost\fR, approved, and finally reach the newsgroup. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-a\fR \fIaddr\fR" 4 .IX Item "-a addr" If the \fB\-a\fR flag is used, \fIaddr\fR (which is usually the e\-mail address of the poster) is added to the article as the body of an Approved header 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.) .Sp Be sure that the reader connection made by \fBinews\fR to post the article is allowed to post approved articles (see the \f(CW\*(C`A\*(C'\fR letter in the \fIaccess\fR parameter of access blocks in \fIreaders.conf\fR). .IP "\fB\-b\fR \fIdatabase\fR" 4 .IX Item "-b database" If the \fB\-b\fR flag 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 the \fBmailpost\fR process does not have write access to the news database directory (notably when it is executed as the mail user). The default value is \fIpathdb\fR as set in \fIinn.conf\fR. .Sp Make sure the specified location exists and is writable by the user \&\fBmailpost\fR runs as. .IP "\fB\-c\fR \fIwait-time\fR" 4 .IX Item "-c wait-time" The \fB\-c\fR flag indicates a length of time to sleep before posting. If duplicate messages are received in this interval (by any instance of \&\fBmailpost\fR using the same database), the article is only posted once, but with Newsgroups header field body modified to crosspost the article to all indicated groups. The units for \fIwait-time\fR 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. .IP "\fB\-d\fR \fIdistribution\fR" 4 .IX Item "-d distribution" If the \fB\-d\fR flag is used, the value given is added to the article as the body of the Distribution header field. .IP "\fB\-f\fR \fIaddr\fR" 4 .IX Item "-f addr" The \fB\-f\fR flag is a synonym for the \fB\-r\fR flag. .IP "\fB\-h\fR" 4 .IX Item "-h" Print usage information and exit. .IP "\fB\-m\fR \fImailing-list\fR" 4 .IX Item "-m mailing-list" If the \fB\-m\fR flag is used, the value given is added to the article in a List-ID header field, if such a header field doesn't already exist. .IP "\fB\-n\fR" 4 .IX Item "-n" If the \fB\-n\fR flag is used, neither an article is posted nor a mail is sent in case an error occurs. Everything is written to the standard output. .IP "\fB\-o\fR \fIoutput-command\fR" 4 .IX Item "-o output-command" Specifies the program to which the resulting article processed by \fBmailpost\fR should be sent. For debugging purpose, \f(CW\*(C`\-o cat\*(C'\fR can be used. The default value is \f(CW\*(C`inews \-S \-h\*(C'\fR. .IP "\fB\-p\fR \fIport\fR" 4 .IX Item "-p port" Specifies the port on which \fBnnrpd\fR is listening, used for article posting. If given, \fB\-p\fR is passed along to \fBinews\fR. .IP "\fB\-r\fR \fIaddr\fR" 4 .IX Item "-r addr" A heuristic is used to determine a reasonable value for the Path header field body. The \fB\-r\fR flag indicates what to use if no other value can be determined. .IP "\fB\-t\fR \fItempdir\fR" 4 .IX Item "-t tempdir" If the \fB\-t\fR flag 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 the \fBmailpost\fR process does not have write access to (notably when it is executed as the mail user). Two paths are tried by default: \fIpathtmp\fR as set in \fIinn.conf\fR, and then \fI/var/tmp\fR if \fIpathtmp\fR is not writable. .Sp Make sure the specified location exists and is writable by the user \&\fBmailpost\fR runs as. .IP "\fB\-x\fR \fIheader\fR[\fB:\fR\fIheader\fR...]" 4 .IX Item "-x header[:header...]" A colon-separated list of additional header fields which should be treated as known header fields; these header fields will be passed through to \fBinews\fR without having \f(CW\*(C`X\-\*(C'\fR prepended. .Sp By default, known header fields are: .Sp .Vb 10 \& Archive \& Archived\-At \& Comments \& Content\-* \& Date \& Distribution \& From \& Injection\-Date \& Keywords \& List\-ID \& Message\-ID \& MIME\-* \& Organization \& References \& Return\-Path \& Sender \& Subject \& Summary .Ve .IP "\fB\-z\fR \fIheader\fR[\fB:\fR\fIheader\fR...]" 4 .IX Item "-z header[:header...]" A colon-separated list of additional header fields which should be removed. .Sp By default, removed header fields are: .Sp .Vb 2 \& X\-Complaints\-To \& X\-Trace .Ve .SH "FILES" .IX Header "FILES" .IP "\fIpathbin\fR/mailpost" 4 .IX Item "pathbin/mailpost" The Perl script itself used to feed an e\-mail message to a newsgroup. .IP "\fIpathdb\fR/mailpost\-msgid.dir and \fIpathdb\fR/mailpost\-msgid.pag" 4 .IX Item "pathdb/mailpost-msgid.dir and pathdb/mailpost-msgid.pag" The default database files which record previously seen message-IDs. .SH "HISTORY" .IX Header "HISTORY" Written by Paul Vixie long ago and then hacked up by James Brister for \s-1INN\s0 integration. Documentation improved by Julien Elie. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBinews\fR\|(1), \fBinn.conf\fR\|(5), \fBlibinn_uwildmat\fR\|(3), \fBmoderators\fR\|(5), \fBnnrpd\fR\|(8), \&\fBreaders.conf\fR\|(5).