Prefix lines in DebugWriter with CLIENT and SERVER#288
Open
arp242 wants to merge 1 commit intoemersion:masterfrom
Open
Prefix lines in DebugWriter with CLIENT and SERVER#288arp242 wants to merge 1 commit intoemersion:masterfrom
arp242 wants to merge 1 commit intoemersion:masterfrom
Conversation
Strictly this isn't needed since client commands are in the form "verb arguments" and server replies are in the form "numeric-code text". But not everyone is intimately familiar with SMTP, and even if you are, IMHO the CLIENT/SERVER prefixes makes the output a lot easier to scan. Full example: 220 smtp.fastmail.com ESMTP ready EHLO localhost 250-smtp.fastmail.com 250-PIPELINING 250-SIZE 71000000 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER AUTH LOGIN QyxzeSdXKiJDMwo= 334 UGFzc3dvcmQ6 VEordkp6dEhYPAo= 235 2.0.0 OK MAIL FROM:<from@arp242.net> BODY=8BITMIME 250 2.1.0 Ok RCPT TO:<to@arp242.net> 250 2.1.5 Ok DATA 354 End data with <CR><LF>.<CR><LF> From: from@arp242.net To: to@arp242.net Subject: test Test . 250 2.0.0 Ok: queued as 40BECEC0498 5F5864B5217 via phl-compute-03 QUIT 221 2.0.0 Bye Becomes: SERVER 220 smtp.fastmail.com ESMTP ready CLIENT EHLO localhost SERVER 250-smtp.fastmail.com SERVER 250-PIPELINING SERVER 250-SIZE 71000000 SERVER 250-ENHANCEDSTATUSCODES SERVER 250-8BITMIME SERVER 250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER CLIENT AUTH LOGIN QyxzeSdXKiJDMwo= SERVER 334 UGFzc3dvcmQ6 CLIENT VEordkp6dEhYPAo= SERVER 235 2.0.0 OK CLIENT MAIL FROM:<from@arp242.net> BODY=8BITMIME SERVER 250 2.1.0 Ok CLIENT RCPT TO:<to@arp242.net> SERVER 250 2.1.5 Ok CLIENT DATA SERVER 354 End data with <CR><LF>.<CR><LF> CLIENT From: from@arp242.net CLIENT To: to@arp242.net CLIENT Subject: test CLIENT CLIENT Test CLIENT . SERVER 250 2.0.0 Ok: queued as 7899B14002F7 7BE7C338A76 via phl-compute-01 CLIENT QUIT SERVER 221 2.0.0 Bye
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Strictly this isn't needed since client commands are in the form "verb arguments" and server replies are in the form "numeric-code text". But not everyone is intimately familiar with SMTP, and even if you are, IMHO the CLIENT/SERVER prefixes makes the output a lot easier to scan.
Full example:
Becomes: