Menu

#89 Space between "mail from:" and mail address no longer allowed

v1.0 (example)
closed
nobody
None
5
2024-01-04
2023-09-14
No

Hi,
i have noticed, that with version 2.5 it is no longer allowed to have a space between the mail from: and the mail address:

220 6fd75685-8e4c-4fcc-b03b-87314318cc54 -- E-MailRelay V2.4.1 -- Service ready
helo a
250 OK
mail from: <a@b.c>
250 OK

220 6fd75685-8e4c-4fcc-b03b-87314318cc54 -- E-MailRelay V2.5 -- Service ready
helo a
250 hello
mail from: <a@b.c>
553 mailbox name not allowed: missing or invalid angle brackets in mailbox name

I know that this is technically correct as it is as specified in https://www.rfc-editor.org/rfc/rfc5321.html
But mail servers are typically not so strict.
Was this change intentional?

Most mail servers do also allow to ommit the angled brackets so that even mail from: a@b.c would be accepted which isn't the case for the E-MailRelay.

Rejecting the command because of the space is a problem for us because we use a tool which always adds this.

Discussion

  • Graeme Walker

    Graeme Walker - 2023-09-14

    The MAIL command parsing was rewritten for v2.5 because it now supports the SMTPUTF extension, ie. UTF-8 mailbox names.

    I guess allowing a space would be okay for the next release.

    GSmtp::ServerParser::parseAddressPart() in src/gsmtp/gsmtpserverparser.cpp:

    - startpos++ ;
    + for( startpos++ ; (startpos+2U) < line.size() && line[startpos] == ' ' ; startpos++ ) {}
    

    The angle brackets thing was an issue quite a few years ago, but no one complains nowadays so it's not something I am ever going to "fix" (ie. break).

     
  • Bastian Schumacher

    Thank you, allowing the space is very helpful.
    I havn't encountered a tool that ommits the angled brackets yet, so this is much less of a concern. It is just a little bit inconvenient when sending test mails using telnet. Especially as i am used to omitting them as mail servers typically accept this. So leaving this as is is fine.

     
  • David Stafford

    David Stafford - 2023-10-08

    I just noticed that Outlook's SMTP function seems to add the space between the colon and the angled bracket which prevents it from working.

    emailrelay: 20231009.002836.555: info: rx<<: "MAIL FROM: test@mydomain.com"
    emailrelay: 20231009.002836.555: info: tx>>: "553 mailbox name not allowed: missing or invalid angle brackets in mailbox name"

    I see there are some release candidates for 2.5.1. Is there a date for 2.5.1?

    Regards

    David

     
  • Graeme Walker

    Graeme Walker - 2023-10-08

    You can use v2.4.1 as a work-round for this. The v2.5.1 code is feature complete and quite well tested, so I expect I will be able to release it in a week or so. (One last thing I am trying to do is get the windows build scripts compatible with TeamCity Cloud, and maybe use it for some components of the windows release build.)

     
  • Graeme Walker

    Graeme Walker - 2023-11-12
    • status: open --> closed
     
  • Graeme Walker

    Graeme Walker - 2023-11-12

    Fixed in v2.5.1

     
  • hijmen

    hijmen - 2024-01-04

    thnx, came here to report exactly the same.
    working with a linux vm I could not get around the error (2.5.0) so tried the windows version (2.5.1a) and that was working.

    I am not well knowledged about building from code. Will there be a .deb for Linux Ubuntu made available for 2.5.1a as well?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.