Code Monkey home page Code Monkey logo

Comments (8)

andris9 avatar andris9 commented on July 20, 2024

Thanks for the info, as I'm not familiar with Exim.

Could you please set the debug parameter to true and report the log back to here? No need to include real server names or accounts in the log, these can be replaced with placeholders.

nodemailer.SMTP = {
    debug:true,
    ....

from nodemailer.

r0kawa avatar r0kawa commented on July 20, 2024

Sending Mail
CONNECTION: 220 example.com ESMTP Exim 4.67 Fri, 06 May 2011 16:25:40 +0800
Connection established!
SEND:
"EHLO [127.0.0.1]\r\n"
RECEIVE:
"250-example.com Hello [127.0.0.1]\r\n250-SIZE 20971520\r\n250-PIPELINING\r\n250-AUTH PLAIN LOGIN\r\n250-STARTTLS\r\n250 HELP\r\n" ""
Routing Data
STARTTLS:
SEND:
"STARTTLS\r\n"
RECEIVE:
"220 TLS go ahead\r\n" ""
Routing Data
RECEIVE:
"\u0016\u0003\u0001\u0000J\u0002\u0000\u0000F\u0003\u0001Mð��}>�I&2�,����:f3z\bVq�?$\u0000���� �Ӌ൑2!�_��\f��K��}YJ\b��gӈ�&�/F\u00005\u0000\u0016\u0003\u0001\u0002�\u000b\u0000\u0002�\u0000\u0002�\u0000\u0002�0�\u0002�0�\u0001�\u0002\t\u0000ޒ\u0017CӥMz0\r\u0006\t_�H��\r\u0001\u0001\u0005\u0005\u00000��1\u000b0\t\u0006\u0003U\u0004\u0006\u0013\u0002GB1\u00150\u0013\u0006\u0003U\u0004\b\u0013\fSomeprovince1\u00110\u000f\u0006\u0003U\u0004\u0007\u0013\bSometown1\r0\u000b\u0006\u0003U\u0004\n\u0013\u0004none1\r0\u000b\u0006\u0003U\u0004\u000b\u0013\u0004none1\u00120\u0010\u0006\u0003U\u0004\u0003\u0013\tlocalhost1!0\u001f\u0006\t_�H��\r\u0001\t\u0001\u0016\u0012webaster@localhost0\u001e\u0017\r070423015106Z\u0017\r340907015106Z0��1\u000b0\t\u0006\u0003U\u0004\u0006\u0013\u0002GB1\u00150\u0013\u0006\u0003U\u0004\b\u0013\fSomeprovince1\u00110\u000f\u0006\u0003U\u0004\u0007\u0013\bSometown1\r0\u000b\u0006\u0003U\u0004\n\u0013\u0004none1\r0\u000b\u0006\u0003U\u0004\u000b\u0013\u0004none1\u00120\u0010\u0006\u0003U\u0004\u0003\u0013\tlocalhost1!0\u001f\u0006\t_�H��\r\u0001\t\u0001\u0016\u0012webaster@localhost0��0\r\u0006\t_�H��\r\u0001\u0001\u0001\u0005\u0000\u0003��\u00000��\u0002��\u0000�'b����\u0000C\u0013z��4Ňv͘a�\u0018�\u0004J1��EmuD�UC��\u001cL�l�4:�$J�h��\u000f%$�N�\u0013�<�ϵa?�:\u001e2��ۨF,L&\u0002":C���,\u0007�� \u0003(/}�˷� ��]�`��\b��<\u001c�W�n�\u0017��8�lw��3\��\u0002\u0003\u0001\u0000\u00010\r\u0006\t_�H��\r\u0001\u0001\u0005\u0005\u0000\u0003��\u0000����Z1��I���D���J�-0�WMzVBV�[\fd\u0006��d�e\u0010��wU��Z\tp\u0010��\u0013� �|�M�\u0016e\u000e�}�M\u0003G���C�\u0012�2/��\u000f��l]6�"Z�r~����\u0016…'�ʎ�K�\u0014���N����h�\bn�v�\u000e��U��\u0016\u0003\u0001\u0000\u0004\u000e\u0000\u0000\u0000" ""
RECEIVE:
"\u0014\u0003\u0001\u0000\u0001\u0001\u0016\u0003\u0001\u00000��.�����H�\u0018DSX\u0019���G\u0007�U\u00102\u000f�P���A�\u001b<L�\u001dv��k!�a�_��" ""
Mail.emit { '0': 'connection_stable' }
SEND:
"AUTH PLAIN xxxxxxxxxxxxx==\r\n"
RECEIVE:
"503 AUTH command used when not advertised\r\n" ""
Routing Data
Error occured
503 AUTH command used when not advertised

from nodemailer.

andris9 avatar andris9 commented on July 20, 2024

Hmmm, this needs to be investigated. Currently the order of the actions seems to be OK

  1. Client sends

    EHLO [127.0.0.1]

  2. And server responds with

    250-example.com Hello [127.0.0.1]
    250-AUTH PLAIN LOGIN
    ....

  3. Client initiates TLS which succeeds

  4. Client tries to authenticate with PLAIN (permission for that was given after EHLO with 250-AUTH PLAIN LOGIN <-- means that the server supports both PLAIN and LOGIN auth mechanisms)

  5. Server responds with error

Maybe Exim needs another EHLO after TLS has been established or something like that

from nodemailer.

r0kawa avatar r0kawa commented on July 20, 2024

TQ for your time. Let me know if I can help any futher.

from nodemailer.

bmeck avatar bmeck commented on July 20, 2024

yes sometimes it appears you should send EHLO after TLS. after starttls most servers do not require it, but some take the ESMTP spec quite literally and forget everything about the connection.

from nodemailer.

andris9 avatar andris9 commented on July 20, 2024

Does resending the EHLO affect other servers some ways too?

There's not much to "forget" as there hasn't been any interaction yet (no login, no "mail from" etc.) so sending EHLO for every server (not just Exim) after STARTTLS should not break anything? It's not a good way to go detecting responding server types (Exchange, Exim, Postfix..) much better approach would be behaving everytime the same be it one way or another.

from nodemailer.

bmeck avatar bmeck commented on July 20, 2024

It should not affect other servers, and there are some things you can do that slightly alter server state, mainly what is going on is it is forgetting the sending host.

from nodemailer.

andris9 avatar andris9 commented on July 20, 2024

fixed with deb3915

from nodemailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.