Menu

#22 angle brackets around email address

v1.0 (example)
wont-fix
nobody
None
5
2026-05-07
2013-05-01
Powelly
No

E-MailRelay does not seem to like email address in the "mail from:" and "rcpt to:" fields to be "simple addresses" i.e. without angle brackets.
For example:

mail from: <example@example.com>
250 OK

however

mail from: example@example.com
553 mailbox name not allowed: missing or invalid angle brackets in mailbox name

RFC 822 allows simple addresses to be used.

Discussion

  • Graeme Walker

    Graeme Walker - 2013-12-07

    I'm not sure that's right for SMTP. RFC 821 has this: RCPT <sp> TO:<forward-path> <crlf>, <forward-path> ::= <path>, <path> ::= "<" [ <a-d-l> ":" ]</a-d-l> <mailbox> ">". And RFC 2821 says "The second step in the procedure is the RCPT command. RCPT TO:<forward-path> [ SP <rcpt-parameters> ]</rcpt-parameters> <crlf>. The first or only argument to this command includes a forward-path (normally a mailbox and domain, always surrounded by "<" and ">" brackets) identifying one recipient. </crlf></forward-path></mailbox></path></path></forward-path></crlf></forward-path></sp>

     
  • Graeme Walker

    Graeme Walker - 2013-12-07
    • status: open --> wont-fix
    • Group: --> v1.0 (example)
     
  • foobar

    foobar - 2021-08-20

    Can someone re-open this?

     
  • Graeme Walker

    Graeme Walker - 2021-08-20

    If you have to make emailrelay work with buggy software then you could patch the emailrelay source code and rebuild. I've attached a plausible patch for the 2.2 codebase.

    Note that RFC-822 defines a standard format for email files and SMTP payloads, but not the SMTP protocol itself. Even RFC-788 from 1981 is clear on the SMTP protocol syntax -- refer to section 4.1.2 and to the examples throughout.

     
  • foobar

    foobar - 2021-08-21

    Looks great, I'll see if I can figure out how to get this compiled.

     
  • foobar

    foobar - 2021-08-21

    Tried hMailServer, looks like it works out of the box and accepts relay requests from LSI storage authority

     
  • Great Tree Man

    Great Tree Man - 2026-05-07

    Hi,
    I'm facing the same issue right now with a scanner. It's sender field uses no brackets therefore SMTPRelay can't process it. I'm using the current version 2.6.1 for Windows. Is the patch.p1 still working for this version? Also I'm not too familiar with compiling, any recommendations for Windows?

     
  • Graeme Walker

    Graeme Walker - 2026-05-07

    You can use 2.6.1 on Windows, just add "--server-smtp-config=nostrictparsing".

     

Log in to post a comment.

MongoDB Logo MongoDB