Problems making local postings to inn2

Russ Allbery eagle at eyrie.org
Fri Jun 2 22:11:15 UTC 2017


Jeffery Small <jeff at cjsa.com> writes:

> These messages get left in my inbox and I have investigated the headers of
> these failed posts in great detail.  I can find no instances of:

>     * A header that does not have a "Name:<space>" format
>     * A header with an empty field after the :<space>
>     * Any odd characters: e.g., no non-ascii-7 characters

> Everything appears normal, so I am at a loss to see why these fail.
> Any suggestions as to where to look for the problem?

Are you perhaps sending just CR and not CRLF at the end of lines?  That's
the first thing that comes to mind here.

Is there any chance you could include the full headers of one of these
rejected messages?

> Also, is there a way to get inn2 to generate better diagnostic output.
> Despite all these (and other) problems, the log file /var/log/news/errlog
> is always empty and the other news logs have little useful information
> to help isolate a problem.

Well, this isn't an error from the INN perspective -- rejecting malformed
articles is just normal.  I think the rejection may be logged to
news.notice by nnrpd, though.  But it's not going to contain any more
information than the 411 error you already included, because that's all
the information there is.

        if (hp->Value) {
            hp->Len = TrimSpaces(hp->Value);
            /* If the header is empty, we just remove it.  We do not reject
             * the article, contrary to what an injecting agent is supposed
             * to do per Section 3.5 of RFC 5537.  (A revision to RFC 5537
             * may someday allow again that existing and useful feature.) */
            if (hp->Len == 0) {
                hp->Value = hp->Body = NULL;
            } else if (!IsValidHeaderBody(hp->Value)) {
                snprintf(Error, sizeof(Error),
                         "Invalid syntax encountered in %s: header field "
                         "body (unexpected byte or empty content line)",
                         hp->Name);
                return Error;
            }
        }

The check is really pretty simple and very low-level: there has to be at
least one non-whitespace character in the field body, CR can't appear by
itself, LF or CRLF has to be followed by whitespace or another header, and
every character has to satisfy the C function isgraph() ("any printable
character except space") or be a space or tab.

-- 
Russ Allbery (eagle at eyrie.org)              <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list