Closed mathe42 closed 1 year ago
Just for your information it looks like a bug / issue with your specific smtp-server.
Hello here is the document requested, we are using an individually owned company mailer that we host on site. I read that we are unable to use the Microsoft servers and the google servers so we moved it to a different one. Would you have any idea what it may be specifically blocking so I can get my IT guys to look for it? debug with true.txt
Just some quick info:
Some ideas to test (just use deno vendor
so you can modify the code)
at https://github.com/EC-Nordbund/denomailer/blob/main/client/basic/client.ts#L316
try adding await this.#connection.writeCmd("\r\n");
.
If you can send me some server-credentials so I can test directly on your smtp-server it will be faster fixed. (email: 2pi_r2@gmx.de)
So I did as you requested and added that piece into the spot you suggested, I have also attached the .debug document.
I'm talking with my smtp server tech, what kinds of settings would you look for to fix this issue?
I have theory, I have been researching with my tech guy and it looks its recieving the message and waiting for a '.' at the end to be able to send it. I found a document on the smtp command https://www.shellhacks.com/send-email-smtp-server-command-line/ and it mentions their needs to be a period on a line by its self to signify the end. Both the server and I are getting that request, I'm sure you've built that in somewhere I'm just not sure why its not running.
I'm sure you've built that in somewhere I'm just not sure why its not running.
I can see that denomailer sends this message:
(1) ['.
']
at end of your log.
So we are here https://github.com/EC-Nordbund/denomailer/blob/main/client/basic/client.ts#L315
from there on the following happens:
try { // started in L75
await this.#connection.writeCmd(".\r\n"); // send . to server to end data mode (the server did not end data mode)
this.#connection.assertCode( // the server is in "DATA-MODE" so it sends nothing so this will throw
await this.#connection.readCmd(),
CommandCode.OK,
);
await this.#cleanup();
this.#que.next();
} catch (ex) {
await this.#cleanup(); // as server is still in "DATA-MODE" this is an infinite loop.
this.#que.next();
throw ex;
}
}
Try import denomailer from https://raw.githubusercontent.com/EC-Nordbund/denomailer/fix/data-mode/mod.ts
this should give an error and logs "Error while in datamode - connection not revoverable"
So I ran that test mod, and it provided the error code. Is there any ideas on how to make it work?
I'm not sure I would guess that this is an error with the SMTP server. I don't know what other clients are doning differently.
I just had a lock at nodemailer (for nodejs) and it basicly does the same (refrence: https://github.com/nodemailer/nodemailer/blob/master/lib/smtp-connection/data-stream.js#L93)
What you can do is try changing this line https://github.com/EC-Nordbund/denomailer/blob/main/client/basic/client.ts#L315 and experiment with different strings. But I'm quite sure that this will not change anything.
No more reproduction provided so closing this.
@Enyorose Your code looks good (also the debug-output). Could you try it again with the
debug.encodeLB
option set to true?