Quantcast

message sent by detector has duplicate Message-Id header, rejected by SMTP server

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

message sent by detector has duplicate Message-Id header, rejected by SMTP server

Dan Tenenbaum
Hi,

(First of all, is this list still up? I saw some discussion of moving it, and very little traffic. If the list is elsewhere, please let me know where to go.)

OK, I am trying to switch to a new SMTP email server, one provided by Amazon Simple Email Service (SES).

Messages sent by roundup to this server bounce back to me with the error:

DetectorError: Error: couldn't send email: (554, "Transaction failed: Duplicate header 'Message-ID'.")

If I instead arrange to have the same email sent to a mailcatcher app so I can inspect the email, it does indeed have two (identical) Message-Id headers (note the difference in case between the actual headers and the error message (Message-Id vs. Message-ID); not sure if it is significant).

Here is an example of the kind of email (with headers) that causes this error, in between dashed lines. I've lightly edited some of the identifying information.

You can see that the Message-Id header, with identical value, appears twice.

This message is sent by the detector called nosyreaction.py which I guess is a detector that is supplied with roundup. It may have been modified slightly since we started using it.

I notice that the detector code has references to 'msgid' so I wonder if this gets translated to a Message-Id header at some point. This is the code for the unmodified version:

http://sourceforge.net/p/roundup/code/ci/default/tree/website/issues/detectors/nosyreaction.py

Any ideas for suppressing these duplicate headers?

This is with roundup 1.5.0.

Thanks,
Dan


----

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Reply-To: Someone at Somewhere <[hidden email]>
Message-Id: <[hidden email]>
X-Roundup-issue-files: spbtest_0.99.0.tar.gz
X-Roundup-issue-priority: software package
Content-Transfer-Encoding: quoted-printable
Subject: [issue1] spbtest
To: [hidden email]
From: a sender <[hidden email]>
Date: Fri, 21 Aug 2015 05:10:06 +0700
Precedence: bulk
X-Roundup-Name: the name of this tracker
X-Roundup-Loop: hello
X-Roundup-Version: 1.5.0
Message-Id: <[hidden email]>
Reply-To: Our file submit tracker <[hidden email]>

here is the message body

-----

------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message sent by detector has duplicate Message-Id header, rejected by SMTP server

John P. Rouillard
Hi Dan:

In message <[hidden email]>,
Dan Tenenbaum writes:
>
>(First of all, is this list still up? I saw some discussion of
>moving it, and very little traffic. If the list is elsewhere,
>please let me know where to go.)

I got your email at least so I claim the list is up.

>OK, I am trying to switch to a new SMTP email server, one provided
>by Amazon Simple Email Service (SES).
>
>Messages sent by roundup to this server bounce back to me with the error:
>
>DetectorError: Error: couldn't send email: (554, "Transaction failed:
>Duplicate header 'Message-ID'.")
>
>If I instead arrange to have the same email sent to a mailcatcher app
>so I can inspect the email, it does indeed have two (identical)
>Message-Id headers (note the difference in case between the actual
>headers and the error message (Message-Id vs. Message-ID); not sure
>if it is significant).

I claim not significant.

> [...]
>You can see that the Message-Id header, with identical value, appears twice.
>
>This message is sent by the detector called nosyreaction.py which I
>guess is a detector that is supplied with roundup. It may have been
>modified slightly since we started using it.
>
>I notice that the detector code has references to 'msgid' so I wonder
>if this gets translated to a Message-Id header at some point.

It doesn't.  msgid is the internal message id for the message (think
msgid as the handle in the database (msg1, msg200 ...) not the smtp
message id header.)

I have email logs from my development setup and I think I see the same
duplicate headers. However, my development setup isn't working at the
moment so I can't debug this issue.

Note, if you change the debug variable in the [mail] section of the
trackers config.ini:

  # Setting this option makes Roundup to write all outgoing email
  # messages to this file *instead* of sending them.
  # This option has the same effect as environment variable SENDMAILDEBUG.
  # Environment variable takes precedence.
  # The path may be either absolute or relative
  # to the directory containig this config file.
  # Default:
  debug = /tmp/tracker_mail.log

it will write the email to /tmp/tracker.email_log, so you don't have
to use an email catcher.

>Any ideas for suppressing these duplicate headers?

Note that both Message-Id and Reply-To are duplicated. Message-Id has
the same value in both cases, but Reply-To is different.

It looks like the headers are added at roundupdb.py in the function
send_message. I see three occurrances of Message-Id in that
function. The first is around line 529 that reads:

            # message ids
            if messageid:
                message['Message-Id'] = messageid
            if inreplyto:
                message['In-Reply-To'] = inreplyto

Can you change that to read:

                message['MESSAGE-ID'] = messageid

and see if one of the headers changes case. If so that will tell us
that we are in the correct codepath. As a second test, change back the
capitalization at line 529. and change the case of one of the other
matches for Message-Id in that function. Hopefully this will tell us
where the first and second copies of the header are coming from.

Since the X-Roundup-issue* headers are added at line 554, I am
guessing the first Message-Id header comes from line 529.

However, unless crypt is in use, I don't see how the additional
headers are getting in there. The Message-Id header values are the
same in both cases, but Reply-To is different so even more confusion
on my part.

Hopefully changing the headers in the code (remember to restart the
server process between code changes) will narrow this down.

Sample message

>MIME-Version: 1.0
>Content-Type: text/plain; charset="utf-8"
>Reply-To: Someone at Somewhere <[hidden email]>
>Message-Id: <[hidden email]>
>X-Roundup-issue-files: spbtest_0.99.0.tar.gz
>X-Roundup-issue-priority: software package
>Content-Transfer-Encoding: quoted-printable
>Subject: [issue1] spbtest
>To: [hidden email]
>From: a sender <[hidden email]>
>Date: Fri, 21 Aug 2015 05:10:06 +0700
>Precedence: bulk
>X-Roundup-Name: the name of this tracker
>X-Roundup-Loop: hello
>X-Roundup-Version: 1.5.0
>Message-Id: <[hidden email]>
>Reply-To: Our file submit tracker <[hidden email]>
>
>here is the message body

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message sent by detector has duplicate Message-Id header, rejected by SMTP server

Cédric Krier
In reply to this post by Dan Tenenbaum
On 2015-08-20 16:01, Dan Tenenbaum wrote:

> Hi,
>
> (First of all, is this list still up? I saw some discussion of moving it, and very little traffic. If the list is elsewhere, please let me know where to go.)
>
> OK, I am trying to switch to a new SMTP email server, one provided by Amazon Simple Email Service (SES).
>
> Messages sent by roundup to this server bounce back to me with the error:
>
> DetectorError: Error: couldn't send email: (554, "Transaction failed: Duplicate header 'Message-ID'.")
>
> If I instead arrange to have the same email sent to a mailcatcher app so I can inspect the email, it does indeed have two (identical) Message-Id headers (note the difference in case between the actual headers and the error message (Message-Id vs. Message-ID); not sure if it is significant).
>
> Here is an example of the kind of email (with headers) that causes this error, in between dashed lines. I've lightly edited some of the identifying information.
>
> You can see that the Message-Id header, with identical value, appears twice.
>
> This message is sent by the detector called nosyreaction.py which I guess is a detector that is supplied with roundup. It may have been modified slightly since we started using it.
>
> I notice that the detector code has references to 'msgid' so I wonder if this gets translated to a Message-Id header at some point. This is the code for the unmodified version:
>
> http://sourceforge.net/p/roundup/code/ci/default/tree/website/issues/detectors/nosyreaction.py
>
> Any ideas for suppressing these duplicate headers?
>
> This is with roundup 1.5.0.
I think it was fixed by http://issues.roundup-tracker.org/issue2550869

--
Cédric Krier - B2CK SPRL
Email/Jabber: [hidden email]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

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

_______________________________________________
Roundup-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-users

attachment0 (354 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message sent by detector has duplicate Message-Id header, rejected by SMTP server

Ralf Schlatterbeck-3
On Fri, Aug 21, 2015 at 08:53:20AM +0200, Cédric Krier wrote:
[...]
> > DetectorError: Error: couldn't send email: (554, "Transaction failed: Duplicate header 'Message-ID'.")
[...]

> I think it was fixed by http://issues.roundup-tracker.org/issue2550869

I think so, too, just another argument for getting a release out :-)

I'm also still reading the messages here and the mailing list was not
moved (it turned out, although SF had problems with their web services,
the mailinglist was still working).

Ralf
--
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [hidden email]
allmenda.com member                     email: [hidden email]

------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message sent by detector has duplicate Message-Id header, rejected by SMTP server

Dan Tenenbaum
In reply to this post by Cédric Krier


----- Original Message -----

> From: "Cédric Krier" <[hidden email]>
> To: [hidden email]
> Sent: Thursday, August 20, 2015 11:53:20 PM
> Subject: Re: [Roundup-users] message sent by detector has duplicate Message-Id header, rejected by SMTP server
>
> On 2015-08-20 16:01, Dan Tenenbaum wrote:
> > Hi,
> >
> > (First of all, is this list still up? I saw some discussion of
> > moving it, and very little traffic. If the list is elsewhere,
> > please let me know where to go.)
> >
> > OK, I am trying to switch to a new SMTP email server, one provided
> > by Amazon Simple Email Service (SES).
> >
> > Messages sent by roundup to this server bounce back to me with the
> > error:
> >
> > DetectorError: Error: couldn't send email: (554, "Transaction
> > failed: Duplicate header 'Message-ID'.")
> >
> > If I instead arrange to have the same email sent to a mailcatcher
> > app so I can inspect the email, it does indeed have two
> > (identical) Message-Id headers (note the difference in case
> > between the actual headers and the error message (Message-Id vs.
> > Message-ID); not sure if it is significant).
> >
> > Here is an example of the kind of email (with headers) that causes
> > this error, in between dashed lines. I've lightly edited some of
> > the identifying information.
> >
> > You can see that the Message-Id header, with identical value,
> > appears twice.
> >
> > This message is sent by the detector called nosyreaction.py which I
> > guess is a detector that is supplied with roundup. It may have
> > been modified slightly since we started using it.
> >
> > I notice that the detector code has references to 'msgid' so I
> > wonder if this gets translated to a Message-Id header at some
> > point. This is the code for the unmodified version:
> >
> > http://sourceforge.net/p/roundup/code/ci/default/tree/website/issues/detectors/nosyreaction.py
> >
> > Any ideas for suppressing these duplicate headers?
> >
> > This is with roundup 1.5.0.
>
> I think it was fixed by
> http://issues.roundup-tracker.org/issue2550869
>

I can confirm that fixes it.
Thanks,
Dan


> --
> Cédric Krier - B2CK SPRL
> Email/Jabber: [hidden email]
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Roundup-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/roundup-users
>

------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-users
Loading...