> Now if you're talking about what goes to syslog
Yes, that is indeed what I am talking about. Or more precise: I get some
reply from the server. What value is it supposed to represent.

> When you say you have seen the different outputs what are you referring
to?  Syslog'ing of the error message?
Commercial mta's, PowerMTA and Momentum in this case, generally do not
output to syslog... But yes, the error message is saved in a log file and
in one case in a JSON format as well (to aid the automatic processing of
events). Some examples of logs are:

PowerMTA:
550 5.2.1 The email account that you tried to reach is disabled. Learn more
at https://support.google.com/mail/?p=DisabledUser abc.def - gsmtp

Momentum logfile, single line:
550-5.1.1 The email account that you tried to reach does not exist. Please
try\r\n550-5.1.1 double-checking the recipient's email address for typos
or\r\n550-5.1.1 unnecessary spaces. Learn more at\r\n550 5.1.1
https://support.google.com/mail/?p=NoSuchUser abc.def - gsmtp

Momentum JSON entry (mind you: A '\r\n' is a real newline in JSON. See
http://json.org ):
"452-4.2.2 The email account that you tried to reach is over quota. Please
direct\r\n452-4.2.2 the recipient to\r\n452 4.2.2
https://support.google.com/mail/?p=OverQuotaTemp abc.def - gsmtp"

I hate this inconsistency before the weekend ;-).

Yours,


David

On 7 July 2017 at 12:00, Michelle Sullivan <miche...@sorbs.net> wrote:

> David Hofstee wrote:
>
>> Hi,
>>
>> I've an interesting RFC question. In an SMTP reply, one can have single
>> line or multiline replies. E.g.
>>
>> 521 single line reply
>>
>> or
>>
>> 521-Line one
>> 521-Line two
>> 521 Line three
>>
>
> Correct.
>
>>
>> See also https://tools.ietf.org/html/rfc821#page-50 .
>>
>> My question is: The reply is an answer that is, necessarily, formatted
>> for SMTP. But how should the multiline answer be interpreted? What is its
>> 'value'.
>>
>>
> The 'value' to the computer is '521'
>
> If there is an extended code it should be on the first line.
>
> The rest is just the verbose message for the non computer... so should not
> be tampered with.. ie
>
>>
>> /or option 5: Keep everything. Eg. /
>> 521-Line one
>> 521-Line two
>> 521 Line three
>>
>> The RFC does not really state that. So I am not quite sure how that
>> should be logged correctly. Where the formatting starts and what 'value' it
>> is supposed to represent. When I look at other standards (e.g.
>> http://json.org), the formatting and what it is to represent, is more
>> clear.
>>
>
> Now if you're talking about what goes to syslog... undefined, however I've
> seen the message get sent in full as in '521-Line one\n521-Line two\n521
> Line three' (quite literally quoting the \n your option 4, except \n
> instead of \r\n)... I've also seen the code stripped version, ie '521 Line
> one Line two Line three' sorta like your option 1, but the end of line
> terminator is replaced with a white space as '521- Line two' i believe
> (IIRC) is not valid.
>
>
>> This came up when I saw 3 different outputs in different MTA's (1,4 and
>> 5). Not sure if I have to file a bugreport to my favorite MTA supplier.
>>
>
> When you say you have seen the different outputs what are you referring
> to?  Syslog'ing of the error message?
>
>
>> Can anyone say something smart about how the reply should be seen?
>>
>>
> Personally - and this is a personal thing - I would like to see any bounce
> message with entire message as seen (ie unaltered) and I would like to see
> syslog'd messages as one of 2 types...  either each line logged separately
> in order or converted to: "521 Line one Line two Line three" before logging.
>
> Regards,
>
>
> --
> Michelle Sullivan
> http://www.mhix.org/
>
>


-- 
--
My opinion is mine.



-- 
--
My opinion is mine.
_______________________________________________
mailop mailing list
mailop@mailop.org
https://chilli.nosignal.org/cgi-bin/mailman/listinfo/mailop

Reply via email to