Gnus development mailing list
 help / color / mirror / Atom feed
* Outlook rejecting messages because not RFC 5322 Compliant
@ 2016-05-14 21:41 Naim, Halim.
  2016-05-16  8:01 ` Steinar Bang
  2016-05-16 10:09 ` Adam Sjøgren
  0 siblings, 2 replies; 9+ messages in thread
From: Naim, Halim. @ 2016-05-14 21:41 UTC (permalink / raw)
  To: ding

Hey everybody, I tried to send an email message to an outlook address
and it was rejected comalaining that the message is not compliant with
RFC 5322. 
After reading around, It was rejecting it because my address in the
`From:' header is not surrounded by angle brackets. 
After setting `user-mail-address' <my-mail@host.com> everything worked
correctly.

Here is the Delivery Status Notification:

Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the server for the recipient domain outlook.com by mx4.hotmail.com. [207.46.8.199].

The error that the other server returned was:
550 5.7.0 (BAY004-MC6F36) Message could not be delivered. Please ensure the message is RFC 5322 compliant.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-14 21:41 Outlook rejecting messages because not RFC 5322 Compliant Naim, Halim.
@ 2016-05-16  8:01 ` Steinar Bang
  2016-05-16 10:09 ` Adam Sjøgren
  1 sibling, 0 replies; 9+ messages in thread
From: Steinar Bang @ 2016-05-16  8:01 UTC (permalink / raw)
  To: ding

>>>>> <halimsrama@gmail.com> (Naim, Halim.):

> Hey everybody, I tried to send an email message to an outlook address
> and it was rejected comalaining that the message is not compliant with
> RFC 5322. 
> After reading around, It was rejecting it because my address in the
> `From:' header is not surrounded by angle brackets. 
> After setting `user-mail-address' <my-mail@host.com> everything worked
> correctly.

Well... look at the bright side: at least Lookout wasn't demanding
single quotes around the real name...




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-14 21:41 Outlook rejecting messages because not RFC 5322 Compliant Naim, Halim.
  2016-05-16  8:01 ` Steinar Bang
@ 2016-05-16 10:09 ` Adam Sjøgren
  2016-05-16 11:42   ` Naim, Halim.
  1 sibling, 1 reply; 9+ messages in thread
From: Adam Sjøgren @ 2016-05-16 10:09 UTC (permalink / raw)
  To: ding

halimsrama@gmail.com writes:

> After reading around, It was rejecting it because my address in the
> `From:' header is not surrounded by angle brackets.

Take a look at the variable message-from-style:

,----[ C-h v message-from-style RET ]
| message-from-style is a variable defined in `message.el'.
| Its value is default
| 
| Documentation:
| Specifies how "From" headers look.
| 
| If nil, they contain just the return address like:
| 	king@grassland.com
| If `parens', they look like:
| 	king@grassland.com (Elvis Parsley)
| If `angles', they look like:
| 	Elvis Parsley <king@grassland.com>
| 
| Otherwise, most addresses look like `angles', but they look like
| `parens' if `angles' would need quoting and `parens' would not.
`----

[...]

> The error that the other server returned was:

> 550 5.7.0 (BAY004-MC6F36) Message could not be delivered. Please
> ensure the message is RFC 5322 compliant.

How did your From: line look in that email?


  Best regards,

    Adam

-- 
 "Jeg har læst alt hvad google kan finde."                    Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 10:09 ` Adam Sjøgren
@ 2016-05-16 11:42   ` Naim, Halim.
  2016-05-16 12:06     ` Adam Sjøgren
  0 siblings, 1 reply; 9+ messages in thread
From: Naim, Halim. @ 2016-05-16 11:42 UTC (permalink / raw)
  To: ding

M-: message-from-style RET
gave `default'.

The "From:" In the message buffer was in `parens' style.

From: mail@host.com (John, Miller)

Setting it to `angles' also solves the problem. Which I a better solution than my
workaround. 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 11:42   ` Naim, Halim.
@ 2016-05-16 12:06     ` Adam Sjøgren
  2016-05-16 12:24       ` Sven Joachim
  2016-05-16 12:25       ` Naim, Halim.
  0 siblings, 2 replies; 9+ messages in thread
From: Adam Sjøgren @ 2016-05-16 12:06 UTC (permalink / raw)
  To: ding

Halim. writes:

> From: mail@host.com (John, Miller)

Maybe the punctuation within the name confuses Microsoft Exchange...

(I'm too lazy to check the RFCs, but I would expect that Gnus generates
compliant headers...)


  :-),

   Adam

-- 
 "People who post screen shots of text are jerks."            Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 12:06     ` Adam Sjøgren
@ 2016-05-16 12:24       ` Sven Joachim
  2016-05-16 17:06         ` Adam Sjøgren
  2016-05-16 12:25       ` Naim, Halim.
  1 sibling, 1 reply; 9+ messages in thread
From: Sven Joachim @ 2016-05-16 12:24 UTC (permalink / raw)
  To: ding

On 2016-05-16 14:06 +0200, Adam Sjøgren wrote:

> Halim. writes:
>
>> From: mail@host.com (John, Miller)
>
> Maybe the punctuation within the name confuses Microsoft Exchange...
>
> (I'm too lazy to check the RFCs, but I would expect that Gnus generates
> compliant headers...)

Well, the ‘parens’ message-from-style seems to be discouraged in RFC
5322 section 3.4:

,----
|       Note: Some legacy implementations used the simple form where the
|       addr-spec appears without the angle brackets, but included the
|       name of the recipient in parentheses as a comment following the
|       addr-spec.  Since the meaning of the information in a comment is
|       unspecified, implementations SHOULD use the full name-addr form of
|       the mailbox, instead of the legacy form, to specify the display
|       name associated with a mailbox.  Also, because some legacy
|       implementations interpret the comment, comments generally SHOULD
|       NOT be used in address fields to avoid confusing such
|       implementations.
`----

Cheers,
       Sven



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 12:06     ` Adam Sjøgren
  2016-05-16 12:24       ` Sven Joachim
@ 2016-05-16 12:25       ` Naim, Halim.
  2016-05-16 13:52         ` Andreas Schwab
  1 sibling, 1 reply; 9+ messages in thread
From: Naim, Halim. @ 2016-05-16 12:25 UTC (permalink / raw)
  To: ding

I think this is the relevan section (3.4) of the RFC:

----
|3.4.  Address Specification
|
|   Addresses occur in several message header fields to indicate senders
|   and recipients of messages.  An address may either be an individual
|   mailbox, or a group of mailboxes.
|
|   address         =   mailbox / group
|
|   mailbox         =   name-addr / addr-spec
|
|   name-addr       =   [display-name] angle-addr
|
|   angle-addr      =   [CFWS] "<" addr-spec ">" [CFWS] /
|                       obs-angle-addr
|
|   group           =   display-name ":" [group-list] ";" [CFWS]
|
|   display-name    =   phrase
|
|   mailbox-list    =   (mailbox *("," mailbox)) / obs-mbox-list
|
|   address-list    =   (address *("," address)) / obs-addr-list
|
|   group-list      =   mailbox-list / CFWS / obs-group-list
---

In the same section, there is a note:

----
|     Note: Some legacy implementations used the simple form where the
|      addr-spec appears without the angle brackets, but included the
|      name of the recipient in parentheses as a comment following the
|      addr-spec.  Since the meaning of the information in a comment is
|      unspecified, implementations SHOULD use the full name-addr form of
|      the mailbox, instead of the legacy form, to specify the display
|      name associated with a mailbox.  Also, because some legacy
|      implementations interpret the comment, comments generally SHOULD
|      NOT be used in address fields to avoid confusing such
|      implementations.
----

I believe the header being rejected does not conform to this syntax. I
may be wrong as I have no experience with reading RFCs.
The Note seems to describe this case.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 12:25       ` Naim, Halim.
@ 2016-05-16 13:52         ` Andreas Schwab
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2016-05-16 13:52 UTC (permalink / raw)
  To: Naim, Halim.; +Cc: ding

"Naim, Halim." <halimsrama@gmail.com> writes:

> I believe the header being rejected does not conform to this syntax.

It matches addr-spec.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Outlook rejecting messages because not RFC 5322 Compliant
  2016-05-16 12:24       ` Sven Joachim
@ 2016-05-16 17:06         ` Adam Sjøgren
  0 siblings, 0 replies; 9+ messages in thread
From: Adam Sjøgren @ 2016-05-16 17:06 UTC (permalink / raw)
  To: ding

Sven writes:

> On 2016-05-16 14:06 +0200, Adam Sjøgren wrote:

>> (I'm too lazy to check the RFCs, but I would expect that Gnus generates
>> compliant headers...)

> Well, the ‘parens’ message-from-style seems to be discouraged in RFC
> 5322 section 3.4:

Yes, Halim quoted that as well, and Andreas provided the answer to where
the format nevertheless is (still) allowed.

I think the mail server in question is acting on the note prematurely,
but maybe Gnus' default should be changed to "angles", anyway.


  Best regards,

    Adam

-- 
 "Your father traded the tools for M&Ms again"                Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-16 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-14 21:41 Outlook rejecting messages because not RFC 5322 Compliant Naim, Halim.
2016-05-16  8:01 ` Steinar Bang
2016-05-16 10:09 ` Adam Sjøgren
2016-05-16 11:42   ` Naim, Halim.
2016-05-16 12:06     ` Adam Sjøgren
2016-05-16 12:24       ` Sven Joachim
2016-05-16 17:06         ` Adam Sjøgren
2016-05-16 12:25       ` Naim, Halim.
2016-05-16 13:52         ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).