SMTP Handler - get queue id

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

SMTP Handler - get queue id

Oren Nudelman
Hi ,

I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.

Anyone?
Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Shay Ginsbourg
Should try enabling the log (in the sampler) and adding a regex
post-processor (under the sampler) for capturing the queue ID.






On Wed, Apr 7, 2021 at 4:38 PM Oren Nudelman <[hidden email]>
wrote:

> Hi ,
>
> I am trying to get back the queue id in the SMTP response when sending
> email using SMTP handler.
> I can see it in the logs when enabling debug but could not find any way to
> retrieve it during execution.
>
> Anyone?
>


--


Sincerely,



*Shay Ginsbourg*

*Performance, Automation, and Load Testing Expert. *

*​Regulatory Affairs Consultant​ for Medical Software​.*

*(Since 2008)*



*Ginsbourg.co.il*
<http://Ginsbourg.co.il>


Formerly QA Manager of LoadRunner at Mercury Interactive



M.Sc. cum laude in Bio-Medical Engineering

M.Sc. in Mechanical Engineering


Mobile:  +972(0)54-6690915
Email: [hidden email]

Visit my personal page on LinkedIn at:
http://www.linkedin.com/in/shayginsbourg
Reply | Threaded
Open this post in threaded view
|

RE: SMTP Handler - get queue id

Oren Nudelman
Thanks I will try, but looking for SMTP response object on the return I can work with.

-----Original Message-----
From: Shay Ginsbourg [mailto:[hidden email]]
Sent: Wednesday, 7 April 2021 16:49
To: JMeter Users List <[hidden email]>
Subject: Re: SMTP Handler - get queue id

Should try enabling the log (in the sampler) and adding a regex post-processor (under the sampler) for capturing the queue ID.






On Wed, Apr 7, 2021 at 4:38 PM Oren Nudelman <[hidden email]>
wrote:

> Hi ,
>
> I am trying to get back the queue id in the SMTP response when sending
> email using SMTP handler.
> I can see it in the logs when enabling debug but could not find any
> way to retrieve it during execution.
>
> Anyone?
>


--


Sincerely,



*Shay Ginsbourg*

*Performance, Automation, and Load Testing Expert. *

*​Regulatory Affairs Consultant​ for Medical Software​.*

*(Since 2008)*



*Ginsbourg.co.il*
<http://Ginsbourg.co.il>


Formerly QA Manager of LoadRunner at Mercury Interactive



M.Sc. cum laude in Bio-Medical Engineering

M.Sc. in Mechanical Engineering


Mobile:  +972(0)54-6690915
Email: [hidden email]

Visit my personal page on LinkedIn at:
http://www.linkedin.com/in/shayginsbourg



Email secured by Check Point

Report Phishing: https://mta-cnf.iaas.checkpoint.com/mta_feedback?id=e3b15ed5e510d73e85d1534b70a42fc1ad0a10ef34afae92a0bc4fad727288df&ck=16CEDF0A967F;3D4CC6C8CB55;C5CEAA199888;&v=m


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Shay Ginsbourg
That would be a matter of the SMTP protocol rather than a Jmeter issue.







Sincerely,


Shay Ginsbourg

Performance, Automation and Load Testing Expert.

Regulatory Affairs Consultant for Medical Software.

Ginsbourg.com (Since 2008)


Formerly QA Manager of LoadRunner at Mercury Interactive


M.Sc. cum laude in Bio-Medical Engineering

M.Sc. in Mechanical Engineering

Mobile:  +972(0)54-6690915
Email: [hidden email]

Visit my personal page on LinkedIn at:
http://www.linkedin.com/in/shayginsbourg




On Thu, Apr 8, 2021, 11:14 Oren Nudelman <[hidden email]>
wrote:

> Thanks I will try, but looking for SMTP response object on the return I
> can work with.
>
> -----Original Message-----
> From: Shay Ginsbourg [mailto:[hidden email]]
> Sent: Wednesday, 7 April 2021 16:49
> To: JMeter Users List <[hidden email]>
> Subject: Re: SMTP Handler - get queue id
>
> Should try enabling the log (in the sampler) and adding a regex
> post-processor (under the sampler) for capturing the queue ID.
>
>
>
>
>
>
> On Wed, Apr 7, 2021 at 4:38 PM Oren Nudelman <[hidden email]
> >
> wrote:
>
> > Hi ,
> >
> > I am trying to get back the queue id in the SMTP response when sending
> > email using SMTP handler.
> > I can see it in the logs when enabling debug but could not find any
> > way to retrieve it during execution.
> >
> > Anyone?
> >
>
>
> --
>
>
> Sincerely,
>
>
>
> *Shay Ginsbourg*
>
> *Performance, Automation, and Load Testing Expert. *
>
> *​Regulatory Affairs Consultant​ for Medical Software​.*
>
> *(Since 2008)*
>
>
>
> *Ginsbourg.co.il*
> <http://Ginsbourg.co.il>
>
>
> Formerly QA Manager of LoadRunner at Mercury Interactive
>
>
>
> M.Sc. cum laude in Bio-Medical Engineering
>
> M.Sc. in Mechanical Engineering
>
>
> Mobile:  +972(0)54-6690915
> Email: [hidden email]
>
> Visit my personal page on LinkedIn at:
> http://www.linkedin.com/in/shayginsbourg
>
>
>
> Email secured by Check Point
>
> Report Phishing:
> https://mta-cnf.iaas.checkpoint.com/mta_feedback?id=e3b15ed5e510d73e85d1534b70a42fc1ad0a10ef34afae92a0bc4fad727288df&ck=16CEDF0A967F;3D4CC6C8CB55;C5CEAA199888;&v=m
>
>
Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Felix Schumacher
In reply to this post by Oren Nudelman

Am 07.04.21 um 15:38 schrieb Oren Nudelman:
> Hi ,
>
> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.

With "can see it in the logs", you probably the logs from the Java mail
api. I don't think that there is (currently) an easy way to parse those
or to get at the queue id by other means from within JMeter.

Why do you want to get the queue id?

If you really need it, you could open an enhancement issue on the bug
tracker. After dabbling a bit, I think we could parse the queue-id from
the Transport instance in the sendmailcommand by issuing
getLastServerResponse on it. But, it is unclear to me, whether the queue
id is always part of the response and the call chain in JMeter doesn't
allow the addition of that information in a trivial way (at least not at
first glance).

Felix 

>
> Anyone?
>


OpenPGP_signature (855 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: SMTP Handler - get queue id

Oren Nudelman
Hi ,

Thank you for the feedback.
I need the queue id so I can later track the mail on our logs (in case of delivery problems).
I am not sure if all smtp server return it on the response. Testing it via telnet with postfix I get it

220 <ommitted> ESMTP Postfix (Ubuntu)
ehlo <ommitted>
250-<ommitted>
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<ommitted>
250 2.1.0 Ok
rcpt to:<ommitted>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
bla
.
250 2.0.0 Ok: queued as AE804D63A22

-----Original Message-----
From: Felix Schumacher [mailto:[hidden email]]
Sent: Thursday, 8 April 2021 13:44
To: [hidden email]
Subject: Re: SMTP Handler - get queue id


Am 07.04.21 um 15:38 schrieb Oren Nudelman:
> Hi ,
>
> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.

With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.

Why do you want to get the queue id?

If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).

Felix 

>
> Anyone?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Felix Schumacher

Am 11.04.21 um 10:17 schrieb Oren Nudelman:
> Hi ,
>
> Thank you for the feedback.
> I need the queue id so I can later track the mail on our logs (in case of delivery problems).
In that case, I would go with the message-id header. Postfix will log it
and it is in the mail headers. Plus, it will be in the mails on the
destination server and can be seen in the clients.

> I am not sure if all smtp server return it on the response. Testing it via telnet with postfix I get it
>
> 220 <ommitted> ESMTP Postfix (Ubuntu)
> ehlo <ommitted>
> 250-<ommitted>
> 250-PIPELINING
> 250-SIZE 10240000
> 250-VRFY
> 250-ETRN
> 250-STARTTLS
> 250-AUTH PLAIN LOGIN
> 250-AUTH=PLAIN LOGIN
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250 DSN
> mail from:<ommitted>
> 250 2.1.0 Ok
> rcpt to:<ommitted>
> 250 2.1.5 Ok
> data
> 354 End data with <CR><LF>.<CR><LF>
> bla
> .
> 250 2.0.0 Ok: queued as AE804D63A22
But according to RFC 5321 Section 4.2 the text part (which would be
2.0.0 Ok: queued as AE..) is optional (if I interpret it correctly). I
didn't find anything specifying a format for the Ok text message. It
seems to be not defined. Implementing a parser for that information
seems to be a tricky thing and I would not suggest doing it without more
information.

Felix

>
> -----Original Message-----
> From: Felix Schumacher [mailto:[hidden email]]
> Sent: Thursday, 8 April 2021 13:44
> To: [hidden email]
> Subject: Re: SMTP Handler - get queue id
>
>
> Am 07.04.21 um 15:38 schrieb Oren Nudelman:
>> Hi ,
>>
>> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
>> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.
> With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.
>
> Why do you want to get the queue id?
>
> If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).
>
> Felix 
>
>> Anyone?
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


OpenPGP_signature (855 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: SMTP Handler - get queue id

Oren Nudelman
I am using also python smtplib for sending emails (on another project) and they added a patch for getting back the response code and message text.
https://github.com/python/cpython/pull/12148/files
parsing the text should be user side business, but I expected javamail to at least return a response object I ca work with.

Earlier on this thread @Shay Ginsburg suggested parsing the jmeter debug and parse the log file (where indeed this text exists) but it's a way more work to parse large log file instead of a returned object.

-----Original Message-----
From: Felix Schumacher [mailto:[hidden email]]
Sent: Sunday, 11 April 2021 11:47
To: [hidden email]
Subject: Re: SMTP Handler - get queue id


Am 11.04.21 um 10:17 schrieb Oren Nudelman:
> Hi ,
>
> Thank you for the feedback.
> I need the queue id so I can later track the mail on our logs (in case of delivery problems).
In that case, I would go with the message-id header. Postfix will log it and it is in the mail headers. Plus, it will be in the mails on the destination server and can be seen in the clients.

> I am not sure if all smtp server return it on the response. Testing it
> via telnet with postfix I get it
>
> 220 <ommitted> ESMTP Postfix (Ubuntu)
> ehlo <ommitted>
> 250-<ommitted>
> 250-PIPELINING
> 250-SIZE 10240000
> 250-VRFY
> 250-ETRN
> 250-STARTTLS
> 250-AUTH PLAIN LOGIN
> 250-AUTH=PLAIN LOGIN
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250 DSN
> mail from:<ommitted>
> 250 2.1.0 Ok
> rcpt to:<ommitted>
> 250 2.1.5 Ok
> data
> 354 End data with <CR><LF>.<CR><LF>
> bla
> .
> 250 2.0.0 Ok: queued as AE804D63A22

But according to RFC 5321 Section 4.2 the text part (which would be
2.0.0 Ok: queued as AE..) is optional (if I interpret it correctly). I didn't find anything specifying a format for the Ok text message. It seems to be not defined. Implementing a parser for that information seems to be a tricky thing and I would not suggest doing it without more information.

Felix

>
> -----Original Message-----
> From: Felix Schumacher [mailto:[hidden email]]
> Sent: Thursday, 8 April 2021 13:44
> To: [hidden email]
> Subject: Re: SMTP Handler - get queue id
>
>
> Am 07.04.21 um 15:38 schrieb Oren Nudelman:
>> Hi ,
>>
>> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
>> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.
> With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.
>
> Why do you want to get the queue id?
>
> If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).
>
> Felix
>
>> Anyone?
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Felix Schumacher
While I still believe, that you are better of chasing the message-id,
you can try the attached patch, which should give you the message as a
header on the result sample.

Try your luck and report back :)

Felix

Am 11.04.21 um 15:23 schrieb Oren Nudelman:

> I am using also python smtplib for sending emails (on another project) and they added a patch for getting back the response code and message text.
> https://github.com/python/cpython/pull/12148/files
> parsing the text should be user side business, but I expected javamail to at least return a response object I ca work with.
>
> Earlier on this thread @Shay Ginsburg suggested parsing the jmeter debug and parse the log file (where indeed this text exists) but it's a way more work to parse large log file instead of a returned object.
>
> -----Original Message-----
> From: Felix Schumacher [mailto:[hidden email]]
> Sent: Sunday, 11 April 2021 11:47
> To: [hidden email]
> Subject: Re: SMTP Handler - get queue id
>
>
> Am 11.04.21 um 10:17 schrieb Oren Nudelman:
>> Hi ,
>>
>> Thank you for the feedback.
>> I need the queue id so I can later track the mail on our logs (in case of delivery problems).
> In that case, I would go with the message-id header. Postfix will log it and it is in the mail headers. Plus, it will be in the mails on the destination server and can be seen in the clients.
>> I am not sure if all smtp server return it on the response. Testing it
>> via telnet with postfix I get it
>>
>> 220 <ommitted> ESMTP Postfix (Ubuntu)
>> ehlo <ommitted>
>> 250-<ommitted>
>> 250-PIPELINING
>> 250-SIZE 10240000
>> 250-VRFY
>> 250-ETRN
>> 250-STARTTLS
>> 250-AUTH PLAIN LOGIN
>> 250-AUTH=PLAIN LOGIN
>> 250-ENHANCEDSTATUSCODES
>> 250-8BITMIME
>> 250 DSN
>> mail from:<ommitted>
>> 250 2.1.0 Ok
>> rcpt to:<ommitted>
>> 250 2.1.5 Ok
>> data
>> 354 End data with <CR><LF>.<CR><LF>
>> bla
>> .
>> 250 2.0.0 Ok: queued as AE804D63A22
> But according to RFC 5321 Section 4.2 the text part (which would be
> 2.0.0 Ok: queued as AE..) is optional (if I interpret it correctly). I didn't find anything specifying a format for the Ok text message. It seems to be not defined. Implementing a parser for that information seems to be a tricky thing and I would not suggest doing it without more information.
>
> Felix
>
>> -----Original Message-----
>> From: Felix Schumacher [mailto:[hidden email]]
>> Sent: Thursday, 8 April 2021 13:44
>> To: [hidden email]
>> Subject: Re: SMTP Handler - get queue id
>>
>>
>> Am 07.04.21 um 15:38 schrieb Oren Nudelman:
>>> Hi ,
>>>
>>> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
>>> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.
>> With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.
>>
>> Why do you want to get the queue id?
>>
>> If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).
>>
>> Felix
>>
>>> Anyone?
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

0001-Make-smtp-answer-to-data-available-as-header.patch (3K) Download Attachment
OpenPGP_signature (855 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: SMTP Handler - get queue id

Oren Nudelman
Patch was blocked by mail security, can you share link to download?

-----Original Message-----
From: Felix Schumacher [mailto:[hidden email]]
Sent: Sunday, 11 April 2021 16:55
To: [hidden email]
Subject: Re: SMTP Handler - get queue id

While I still believe, that you are better of chasing the message-id, you can try the attached patch, which should give you the message as a header on the result sample.

Try your luck and report back :)

Felix

Am 11.04.21 um 15:23 schrieb Oren Nudelman:

> I am using also python smtplib for sending emails (on another project) and they added a patch for getting back the response code and message text.
> https://github.com/python/cpython/pull/12148/files
> parsing the text should be user side business, but I expected javamail to at least return a response object I ca work with.
>
> Earlier on this thread @Shay Ginsburg suggested parsing the jmeter debug and parse the log file (where indeed this text exists) but it's a way more work to parse large log file instead of a returned object.
>
> -----Original Message-----
> From: Felix Schumacher [mailto:[hidden email]]
> Sent: Sunday, 11 April 2021 11:47
> To: [hidden email]
> Subject: Re: SMTP Handler - get queue id
>
>
> Am 11.04.21 um 10:17 schrieb Oren Nudelman:
>> Hi ,
>>
>> Thank you for the feedback.
>> I need the queue id so I can later track the mail on our logs (in case of delivery problems).
> In that case, I would go with the message-id header. Postfix will log it and it is in the mail headers. Plus, it will be in the mails on the destination server and can be seen in the clients.
>> I am not sure if all smtp server return it on the response. Testing
>> it via telnet with postfix I get it
>>
>> 220 <ommitted> ESMTP Postfix (Ubuntu) ehlo <ommitted> 250-<ommitted>
>> 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS
>> 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES
>> 250-8BITMIME
>> 250 DSN
>> mail from:<ommitted>
>> 250 2.1.0 Ok
>> rcpt to:<ommitted>
>> 250 2.1.5 Ok
>> data
>> 354 End data with <CR><LF>.<CR><LF>
>> bla
>> .
>> 250 2.0.0 Ok: queued as AE804D63A22
> But according to RFC 5321 Section 4.2 the text part (which would be
> 2.0.0 Ok: queued as AE..) is optional (if I interpret it correctly). I didn't find anything specifying a format for the Ok text message. It seems to be not defined. Implementing a parser for that information seems to be a tricky thing and I would not suggest doing it without more information.
>
> Felix
>
>> -----Original Message-----
>> From: Felix Schumacher [mailto:[hidden email]]
>> Sent: Thursday, 8 April 2021 13:44
>> To: [hidden email]
>> Subject: Re: SMTP Handler - get queue id
>>
>>
>> Am 07.04.21 um 15:38 schrieb Oren Nudelman:
>>> Hi ,
>>>
>>> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
>>> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.
>> With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.
>>
>> Why do you want to get the queue id?
>>
>> If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).
>>
>> Felix
>>
>>> Anyone?
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SMTP Handler - get queue id

Felix Schumacher
In the archives at lists.apache.org, you can find the patch at

https://lists.apache.org/api/email.lua?attachment=true&id=rb2ece220b8cf1adfe7ba1ace50eee85a3a23fda843786ab472a3ee37@%3Cuser.jmeter.apache.org%3E&file=93923e518604f472d92972035224c27c50599e99c65d62c86934cc5659fffc53

Felix

Am 12.04.21 um 10:56 schrieb Oren Nudelman:

> Patch was blocked by mail security, can you share link to download?
>
> -----Original Message-----
> From: Felix Schumacher [mailto:[hidden email]]
> Sent: Sunday, 11 April 2021 16:55
> To: [hidden email]
> Subject: Re: SMTP Handler - get queue id
>
> While I still believe, that you are better of chasing the message-id, you can try the attached patch, which should give you the message as a header on the result sample.
>
> Try your luck and report back :)
>
> Felix
>
> Am 11.04.21 um 15:23 schrieb Oren Nudelman:
>> I am using also python smtplib for sending emails (on another project) and they added a patch for getting back the response code and message text.
>> https://github.com/python/cpython/pull/12148/files
>> parsing the text should be user side business, but I expected javamail to at least return a response object I ca work with.
>>
>> Earlier on this thread @Shay Ginsburg suggested parsing the jmeter debug and parse the log file (where indeed this text exists) but it's a way more work to parse large log file instead of a returned object.
>>
>> -----Original Message-----
>> From: Felix Schumacher [mailto:[hidden email]]
>> Sent: Sunday, 11 April 2021 11:47
>> To: [hidden email]
>> Subject: Re: SMTP Handler - get queue id
>>
>>
>> Am 11.04.21 um 10:17 schrieb Oren Nudelman:
>>> Hi ,
>>>
>>> Thank you for the feedback.
>>> I need the queue id so I can later track the mail on our logs (in case of delivery problems).
>> In that case, I would go with the message-id header. Postfix will log it and it is in the mail headers. Plus, it will be in the mails on the destination server and can be seen in the clients.
>>> I am not sure if all smtp server return it on the response. Testing
>>> it via telnet with postfix I get it
>>>
>>> 220 <ommitted> ESMTP Postfix (Ubuntu) ehlo <ommitted> 250-<ommitted>
>>> 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS
>>> 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES
>>> 250-8BITMIME
>>> 250 DSN
>>> mail from:<ommitted>
>>> 250 2.1.0 Ok
>>> rcpt to:<ommitted>
>>> 250 2.1.5 Ok
>>> data
>>> 354 End data with <CR><LF>.<CR><LF>
>>> bla
>>> .
>>> 250 2.0.0 Ok: queued as AE804D63A22
>> But according to RFC 5321 Section 4.2 the text part (which would be
>> 2.0.0 Ok: queued as AE..) is optional (if I interpret it correctly). I didn't find anything specifying a format for the Ok text message. It seems to be not defined. Implementing a parser for that information seems to be a tricky thing and I would not suggest doing it without more information.
>>
>> Felix
>>
>>> -----Original Message-----
>>> From: Felix Schumacher [mailto:[hidden email]]
>>> Sent: Thursday, 8 April 2021 13:44
>>> To: [hidden email]
>>> Subject: Re: SMTP Handler - get queue id
>>>
>>>
>>> Am 07.04.21 um 15:38 schrieb Oren Nudelman:
>>>> Hi ,
>>>>
>>>> I am trying to get back the queue id in the SMTP response when sending email using SMTP handler.
>>>> I can see it in the logs when enabling debug but could not find any way to retrieve it during execution.
>>> With "can see it in the logs", you probably the logs from the Java mail api. I don't think that there is (currently) an easy way to parse those or to get at the queue id by other means from within JMeter.
>>>
>>> Why do you want to get the queue id?
>>>
>>> If you really need it, you could open an enhancement issue on the bug tracker. After dabbling a bit, I think we could parse the queue-id from the Transport instance in the sendmailcommand by issuing getLastServerResponse on it. But, it is unclear to me, whether the queue id is always part of the response and the call chain in JMeter doesn't allow the addition of that information in a trivial way (at least not at first glance).
>>>
>>> Felix
>>>
>>>> Anyone?
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


OpenPGP_signature (855 bytes) Download Attachment