Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: SMTPUTF8 support (RFC6531) #1864

Closed
andris9 opened this issue Mar 26, 2017 · 6 comments · Fixed by #1944
Closed

Feature request: SMTPUTF8 support (RFC6531) #1864

andris9 opened this issue Mar 26, 2017 · 6 comments · Fixed by #1944

Comments

@andris9
Copy link

andris9 commented Mar 26, 2017

I didn't find any mentions on supporting SMTPUTF8 extension. Haraka already supports 8BITMIME so SMTPUTF8 would be a great addition to this.

It is mostly needed to support Email Address Internationalization (EAI) email addresses where both user and domain part can contain non-latin characters. Without SMTPUTF8 it is only possible to use the A-label formatted IDN domains (xn--...) but no way to use non-latin characters in user part.

What needs to be changed to support SMTPUTF8:

  1. The server should add SMTPUTF8 as one of the supported extensions
S: 250-Macintosh.lan Hello Unknown [::1], Haraka is at your service.
S: 250-PIPELINING
S: 250-8BITMIME
S: 250 SMTPUTF8 <-- new keyword
  1. The server must switch to unicode mode if the client uses SMTPUTF8 keyword with MAIL FROM

Without SMTPUTF8 keyword:

C: MAIL FROM:<[email protected]>
S: 250 sender <[email protected]> OK
C: RCPT TO:<андрис@уайлддак.орг>
S: 552 Syntax error (8-bit characters not allowed)

With SMTPUTF8 keyword:

C: MAIL FROM:<[email protected]> SMTPUTF8
S: 250 Accepted
C: RCPT TO:<андрис@уайлддак.орг>
S: 250 recipient <андрис@уайлддак.орг> OK

If SMTPUTF8 keyword is used then UTF8 encoded addresses should be allowed to use with both MAIL FROM and RCPT TO commands.

I don't know much about Haraka internals, so I don't know if this would be something simple or difficult to implement. If it would be too hard to implement in the short term, then maybe you'd take it into the long term plans? I'm pretty sure that EAI addresses are the future.


The email address андрис@уайлддак.орг is a working address. I host it in my IMAP server Wild Duck. Currently I have a my own SMTP server instance running as MX but I would rather use Haraka for this.

@msimerson
Copy link
Member

msimerson commented Mar 27, 2017

Haraka is heading that way. @baudehlo has started updating our address parser with a new version that supports UTF8. Once that new version is released, I think it'll be a SMOP to advertise SMTPUTF8.

@baudehlo
Copy link
Collaborator

That parser is for header email addresses, not SMTP conversation addresses.

I've been looking at what would be involved in this and it's a bit more complex.

We need to update node-address-rfc2821 to support UTF8 addresses. Then we also need it to provide a punycode version of the address when parsed. Otherwise outbound mail won't work.

@baudehlo
Copy link
Collaborator

baudehlo commented May 23, 2017

@andris9 Do you want to check out haraka/node-address-rfc2821#6 and see if that does enough for SMTPUTF8 for you?

It should be enough. I think. A plugin like this should be enough to advertise it:

exports.hook_capabilities = function (next, connection) {
    connection.capabilities.push('SMTPUTF8');
    next();
}

@andris9
Copy link
Author

andris9 commented May 24, 2017

@baudehlo looks awesome, thanks!

@baudehlo baudehlo mentioned this issue Jun 11, 2017
2 tasks
@baudehlo
Copy link
Collaborator

@andris9 feel free to try out the branch above.

@andris9
Copy link
Author

andris9 commented Jun 20, 2017

@baudehlo oh, wow, I can receive mail at андрис@уайлддак.орг again (I used to expose the internal SMTP listener to the internet but I'd rather use Haraka for that), awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants