~nabijaczleweli/ossp#151: 
[lmtp2nntp (all)] postfix lmtp: enhanced "RCPT TO"

#Upstream Ticket 151 from 2007-02-07 20:40:28

Hi .*,

postfix (I assume beginning with 2.3.x) generates "RCPT TO" envelope addresses extended by the "ORCPT" original recipient component. E.g.

=RCPT TO:<newsgroup@lmtp2nntp.invalid>; ORCPT=rfc822;newsgroup@lmtp2nntp.invalid=

The additional component might lead to problems if lmtp2nntp runs in =groupmode envelope= since the parsing of the envelope address will give an unexpected result. For me, the following patch (lmtp2nntp-1.4.1) works, but this is not a thorough parsing at all:

--- lmtp2nntp_main.c    2004-05-07 16:52:03.000000000 +0200
+++ lmtp2nntp_main.c    2007-02-07 20:05:00.000000000 +0100
@@ -1315,7 +1315,7 @@
      *  RFC1893 3.5 Network and Routing Status          X.5.2   Syntax error
      */
     logbook(ctx->;l2, L2_LEVEL_TRACE, "checking parameter syntax");
-    if (str_parse(req->;msg, "m/^RCPT To:\\s*(.+)$/i", &cp) <= 0) {
+    if (str_parse(req->;msg, "m/^RCPT To:\\s*(\\S+)/i", &cp) <= 0) {
         res.statuscode = "501";
         res.dsncode    = "5.5.2";
         res.statusmsg  = "Syntax error in parameters.";=

For me, lmtp2nntp covers much more than I need but is still easy to configure - thank you.

Status
REPORTED
Submitter
~nabijaczleweli
Assigned to
No-one
Submitted
4 months ago
Updated
4 months ago
Labels
CVSTrac lmtp2nntp