On Thu, Oct 07, 2021 at 06:50:22PM +1300, AndrewHardy wrote: > Looks like as long as STARTTLS is present in the server response then > it doesn’t matter if it’s a hyphen or space and the s_client.c library > suggests it just looks for that keyword so that confirms it. Helps to > tell it to encrypt outbound ;)
In you struggle to explain unexpected symptoms, you've managed to grasp at non-existent straws. https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.1.1 ... Normally, the response to EHLO will be a multiline reply. Each line of the response contains a keyword and, optionally, one or more parameters. Following the normal syntax for multiline replies, these keywords follow the code (250) and a hyphen for all but the last line, and the code and a space for the last line. The syntax for a positive response, using the ABNF notation and terminal symbols of RFC 5234 [7], is: https://datatracker.ietf.org/doc/html/rfc5321#section-4.2.1 ... The reply text may be longer than a single line; in these cases the complete text must be marked so the SMTP client knows when it can stop reading the reply. This requires a special format to indicate a multiple line reply. The format for multiline replies requires that every line, except the last, begin with the reply code, followed immediately by a hyphen, "-" (also known as minus), followed by text. The last line will begin with the reply code, followed immediately by <SP>, optionally some text, and <CRLF>. As noted above, servers SHOULD send the <SP> if subsequent text is not sent, but clients MUST be prepared for it to be omitted. For example: 250-First line 250-Second line 250-234 Text beginning with numbers 250 The last line In a multiline reply, the reply code on each of the lines MUST be the same. It is reasonable for the client to rely on this, so it can make processing decisions based on the code in any line, assuming that all others will be the same. In a few cases, there is important data for the client in the reply "text". The client will be able to identify these cases from the current context. [ Note that Postfix uses the reply code from the last line of a multiline reply, and on rare occasions (IIRC only in postscree(8)) violates the requirement that the code be the same on all lines, putting the definitive code last. Some clients may not understand the response code correctly, but such is life in the trenches. This should only ever be observed in negative replies to botnet clients. ] -- Viktor.