Problems making local postings to inn2

Jeffery Small jeff at cjsa.com
Mon Jun 5 03:04:59 UTC 2017


To further debug the problem, Russ and others asked for a sample of a
failing message header.  I modified my mailagent filter to save a raw copy
of the email message in a file.  The message is then sent through my perl
filter to fix potential header problems, a second copy of the modified
message is then saved, and finally it is fed to inews.  This particular
email is "spam" and is intended to be posted to a junk newsgroup where it
can later be quickly revived and disposed of.

As usual, this is the error message:

    inews: cannot send article to server: 441 Invalid syntax encountered in headers
    (unexpected byte, no colon-space, or empty content line)
    inews: article not posted

-------------------------------------------------------------------------------
Here is the original message header (body deleted):
-------------------------------------------------------------------------------
>From noreply at apt-newsletter.gr Sun Jun  4 16:09:02 2017
Received: from dymaxion.cjsa2.com (localhost [127.0.0.1])
	by dymaxion.cjsa2.com (8.15.2/8.15.2/Debian-8ubuntu1) with ESMTP id v54N92ck031389
	for <jeff at localhost>; Sun, 4 Jun 2017 16:09:02 -0700
Delivered-To: cjsmall-cjsa:com-jeff at cjsa.com
X-Envelope-To: jeff at cjsa.com
Received: from engur.pair.com [209.68.5.111]
	by dymaxion.cjsa2.com with POP3 (fetchmail-6.3.26)
	for <jeff at localhost> (single-drop); Sun, 04 Jun 2017 16:09:02 -0700 (PDT)
Received: (qmail 90588 invoked from network); 4 Jun 2017 23:08:15 -0000
Received: from mailwash49.pair.com (66.39.2.49)
  by engur.pair.com with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted); 4 Jun 2017 23:08:15 -0000
Received: from localhost (localhost [127.0.0.1])
	by mailwash49.pair.com (Postfix) with SMTP id EDA121AA5B0
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:14 -0400 (EDT)
X-Virus-Check-By: mailwash49.pair.com
X-Spam-Check-By: mailwash49.pair.com
X-Spam-Status: No, hits=2.7 required=4.0 tests=DKIM_SIGNED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_DBL_SPAM,URIBL_SBL_A autolearn=disabled version=3.004001
X-Spam-Flag: NO
X-Spam-Level: **
X-Spam-Filtered: 67d46a61e4a13fae974a03af52a34da3
Received: from localhost (localhost [127.0.0.1])
	by mailwash49.pair.com (Postfix) with SMTP id A28111AA5AA
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:12 -0400 (EDT)
Received: from apt-newsletter.gr (np5c1.nfs.gr [176.9.4.19])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mailwash49.pair.com (Postfix) with ESMTPS
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:12 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=apt-newsletter.gr; s=default; h=Content-Transfer-Encoding:Content-Type:
	MIME-Version:Message-ID:Subject:Reply-To:From:To:Date:Sender:Cc:Content-ID:
	Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
	:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
	List-Subscribe:List-Post:List-Owner:List-Archive;
	bh=yU/REjFLBPkbKA/RzHd9+v3jLSZPKvNKVNEi/Z0G2l4=; b=Ct9uG6zXUoCL4FMPMKGgfXkSxr
	4F1U8bQQ4aCypbg4oUyusH29araFOAzMXMQVhNVskM1XySdepEmIYEqXVbsrWVu6LNvGbln2QPewm
	NvBa6NGZVXoa30A33N375ycacVv0KC/FJB0hIyuLYKGw1IyQS91Ju9qw+ogig4Qkv5JzzO5u4QA4Y
	7wPSOvSBCJQ9I3zgRXSmmswrzQTKtgqLS/OR1VNh8bew4zmmhNt3PJ/Jwfn+KIRZwJIM+GKtignxh
	oMe47D+yNzU2xvJS63JM8zFZGwiZp8Sghs19mN6FC09n8SHXg9PTvp82YL2p/6FKMyIyqi9g6r2Sf
	rdp+AF4Q==;
Received: from [176.9.4.19] (port=58998 helo=www.apt-newsletter.gr)
	by np5.nfs.gr with esmtpa (Exim 4.89)
	(envelope-from <noreply at apt-newsletter.gr>)
	id 1dHed1-0001re-5i
	for jeff at cjsa.com; Mon, 05 Jun 2017 02:08:11 +0300
Date: Sun, 4 Jun 2017 23:08:11 +0000
To: jeff at cjsa.com
From: Applied Professional Training <noreply at apt-newsletter.gr>
Reply-To: noreply at apt-newsletter.gr
Subject: =?iso-8859-7?B?VmlzdWFsIE1lcmNoYW5kaXNpbmcgyuH04fP03uzh9O/yIC0gweje7eEv?=
 =?iso-8859-7?B?yOXz8+Hr7+3f6uc=?=
Message-ID: <7a05b6974f23922d6d68be1a7f586a81 at www.apt-newsletter.gr>
X-Priority: 3
X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
X-inetid: 456200305789
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="b1_7a05b6974f23922d6d68be1a7f586a81"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - np5.nfs.gr
X-AntiAbuse: Original Domain - cjsa.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - apt-newsletter.gr
X-Get-Message-Sender-Via: np5.nfs.gr: authenticated_id: noreply at apt-newsletter.gr
X-Authenticated-Sender: np5.nfs.gr: noreply at apt-newsletter.gr
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Content-Transfer-Encoding: 7bit
X-Filter: mailagent [version 3.1-81] for jeff at cjsa2.com

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
Here is the modified header just prior to posting:
-------------------------------------------------------------------------------
>From noreply at apt-newsletter.gr Sun Jun  4 16:09:02 2017
X-Rec1: from dymaxion.cjsa2.com (localhost [127.0.0.1])
	by dymaxion.cjsa2.com (8.15.2/8.15.2/Debian-8ubuntu1) with ESMTP id v54N92ck031389
	for <jeff at localhost>; Sun, 4 Jun 2017 16:09:02 -0700
Delivered-To: cjsmall-cjsa:com-jeff at cjsa.com
X-Envelope-To: jeff at cjsa.com
X-Rec2: from engur.pair.com [209.68.5.111]
	by dymaxion.cjsa2.com with POP3 (fetchmail-6.3.26)
	for <jeff at localhost> (single-drop); Sun, 04 Jun 2017 16:09:02 -0700 (PDT)
X-Rec3: (qmail 90588 invoked from network); 4 Jun 2017 23:08:15 -0000
X-Rec4: from mailwash49.pair.com (66.39.2.49)
	by engur.pair.com with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted); 4 Jun 2017 23:08:15 -0000
X-Rec5: from localhost (localhost [127.0.0.1])
	by mailwash49.pair.com (Postfix) with SMTP id EDA121AA5B0
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:14 -0400 (EDT)
X-Virus-Check-By: mailwash49.pair.com
X-Spam-Check-By: mailwash49.pair.com
X-Spam-Status: No, hits=2.7 required=4.0 tests=DKIM_SIGNED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_DBL_SPAM,URIBL_SBL_A autolearn=disabled version=3.004001
X-Spam-Flag: NO
X-Spam-Level: **
X-Spam-Filtered: 67d46a61e4a13fae974a03af52a34da3
X-Rec6: from localhost (localhost [127.0.0.1])
	by mailwash49.pair.com (Postfix) with SMTP id A28111AA5AA
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:12 -0400 (EDT)
X-Rec7: from apt-newsletter.gr (np5c1.nfs.gr [176.9.4.19])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mailwash49.pair.com (Postfix) with ESMTPS
	for <jeff at cjsa.com>; Sun,  4 Jun 2017 19:08:12 -0400 (EDT)
X-Rec8: from [176.9.4.19] (port=58998 helo=www.apt-newsletter.gr)
	by np5.nfs.gr with esmtpa (Exim 4.89)
	(envelope-from <noreply at apt-newsletter.gr>)
	id 1dHed1-0001re-5i
	for jeff at cjsa.com; Mon, 05 Jun 2017 02:08:11 +0300
Date: Sun, 4 Jun 2017 23:08:11 +0000
X-To: jeff at cjsa.com
From: Applied Professional Training <noreply at aptnewsletter.gr>
Reply-To: noreply at apt-newsletter.gr
Subject: =?iso-8859-7?B?VmlzdWFsIE1lcmNoYW5kaXNpbmcgyuH04fP03uzh9O/yIC0gweje7eEv?=
	=?iso-8859-7?B?yOXz8+Hr7+3f6uc=?=
Message-ID: <7a05b6974f23922d6d68be1a7f586a81 at www.apt-newsletter.gr>
X-Priority: 3
X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
X-inetid: 456200305789
Content-Type: multipart/alternative;
	boundary="b1_7a05b6974f23922d6d68be1a7f586a81"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - np5.nfs.gr
X-AntiAbuse: Original Domain - cjsa.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - apt-newsletter.gr
X-Get-Message-Sender-Via: np5.nfs.gr: authenticated_id: noreply at apt-newsletter.gr
X-Authenticated-Sender: np5.nfs.gr: noreply at apt-newsletter.gr
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Approved: jeff at cjsa.com (C. Jeffery Small)
Lines: 720
X-Filter: mailagent [version 3.1-81] for jeff at cjsa2.com

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
And to make things easy, here is a diff between the two:
-------------------------------------------------------------------------------
2c2
< Received: from dymaxion.cjsa2.com (localhost [127.0.0.1])
---
> X-Rec1: from dymaxion.cjsa2.com (localhost [127.0.0.1])
7c7
< Received: from engur.pair.com [209.68.5.111]
---
> X-Rec2: from engur.pair.com [209.68.5.111]
10,13c10,13
< Received: (qmail 90588 invoked from network); 4 Jun 2017 23:08:15 -0000
< Received: from mailwash49.pair.com (66.39.2.49)
<   by engur.pair.com with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted); 4 Jun 2017 23:08:15 -0000
< Received: from localhost (localhost [127.0.0.1])
---
> X-Rec3: (qmail 90588 invoked from network); 4 Jun 2017 23:08:15 -0000
> X-Rec4: from mailwash49.pair.com (66.39.2.49)
> 	by engur.pair.com with ESMTPS (DHE-RSA-AES256-GCM-SHA384 encrypted); 4 Jun 2017 23:08:15 -0000
> X-Rec5: from localhost (localhost [127.0.0.1])
22c22
< Received: from localhost (localhost [127.0.0.1])
---
> X-Rec6: from localhost (localhost [127.0.0.1])
25c25
< Received: from apt-newsletter.gr (np5c1.nfs.gr [176.9.4.19])
---
> X-Rec7: from apt-newsletter.gr (np5c1.nfs.gr [176.9.4.19])
30,42c30
< DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
< 	d=apt-newsletter.gr; s=default; h=Content-Transfer-Encoding:Content-Type:
< 	MIME-Version:Message-ID:Subject:Reply-To:From:To:Date:Sender:Cc:Content-ID:
< 	Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
< 	:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
< 	List-Subscribe:List-Post:List-Owner:List-Archive;
< 	bh=yU/REjFLBPkbKA/RzHd9+v3jLSZPKvNKVNEi/Z0G2l4=; b=Ct9uG6zXUoCL4FMPMKGgfXkSxr
< 	4F1U8bQQ4aCypbg4oUyusH29araFOAzMXMQVhNVskM1XySdepEmIYEqXVbsrWVu6LNvGbln2QPewm
< 	NvBa6NGZVXoa30A33N375ycacVv0KC/FJB0hIyuLYKGw1IyQS91Ju9qw+ogig4Qkv5JzzO5u4QA4Y
< 	7wPSOvSBCJQ9I3zgRXSmmswrzQTKtgqLS/OR1VNh8bew4zmmhNt3PJ/Jwfn+KIRZwJIM+GKtignxh
< 	oMe47D+yNzU2xvJS63JM8zFZGwiZp8Sghs19mN6FC09n8SHXg9PTvp82YL2p/6FKMyIyqi9g6r2Sf
< 	rdp+AF4Q==;
< Received: from [176.9.4.19] (port=58998 helo=www.apt-newsletter.gr)
---
> X-Rec8: from [176.9.4.19] (port=58998 helo=www.apt-newsletter.gr)
48,49c36,37
< To: jeff at cjsa.com
< From: Applied Professional Training <noreply at apt-newsletter.gr>
---
> X-To: jeff at cjsa.com
> From: Applied Professional Training <noreply at aptnewsletter.gr>
52c40
<  =?iso-8859-7?B?yOXz8+Hr7+3f6uc=?=
---
> 	=?iso-8859-7?B?yOXz8+Hr7+3f6uc=?=
57d44
< MIME-Version: 1.0
70c57,58
< Content-Transfer-Encoding: 7bit
---
> Approved: jeff at cjsa.com (C. Jeffery Small)
> Lines: 720
-------------------------------------------------------------------------------

Notes on the header modifications:

 1: The filter is used on all messages and most do post.

 2: The Received: headers are converted to X-Rec##: because I wanted
    inn2 to retain them.  Unfortunately, it still deletes them when
    posting.  (Is there a way to control which headers inn2 will retain?)

 3: Note that the DKIM-Signature: header was deleted as it was too long
    for inn2 and long headers were causing posting rejection.

 4: Header continuation lines are coming in with spaces at the beginning
    of the lines.  All leading whitespace is converted to a <tab>.

 5: If missing, an Approved: and Lines: header are added to the end of
    the header block.

 6: Unless I'm blind, there are no empty headers or unusual characters
    anywhere.
-------------------------------------------------------------------------------

Julien <C9>LIE Wrote:

> I see that you quote an error from inews, an injecting agent that
> connects to nnrpd to POST articles.  Couldn't you try to use rnews
> instead? rnews uses IHAVE to submit articles to innd, which performs
> less checks (as articles are considered already injected into the news
> service, and therefore should go on being propagated).

/usr/bin/rnews points to usr/lib/news/bin/rnews which is:

    -rwsr-xr-- 1 news uucp 22640 Dec 29 16:21 /usr/lib/news/bin/rnews

I cannot execute this as a normal user with the given permissions.  Any
comments on that?  I could change the permissions so that my mailagent
utility could then access it, but I'm asuming that this is set this way
for a reason.

-------------------------------------------------------------------------------

I do really appreciate all the help that is being offered and look forward
to continuing this discussion and getting to the bottom of the problem.

Regards,
--
Jeffery Small


More information about the inn-workers mailing list