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

Connection close and relay #87

Merged
merged 6 commits into from Nov 7, 2015
Merged

Conversation

donut87
Copy link
Contributor

@donut87 donut87 commented Oct 6, 2015

Hi,

these two commits allow us to relay incoming mails. diresis commit ensures, that there is no "null" recipient or sender and the other commit closes the smtp connection after sending an email. This was necessary because we always got an error when the connection was closed by the smtp server.

Cheers

Christian

Christoph Rissner and others added 2 commits September 4, 2015 17:21
look for email addresses in `envelope.from` and `envelope.to` if the
`.address` is undefined.

closes maildev#86.
@diresi
Copy link
Contributor

diresi commented Oct 6, 2015

Works for me, thanks a lot!

Since the connection needs to be closed (quit), we need to reconfigure
the smtp connection.
also inserted it.
Sorry for multiple commits I am new to 'npm test'
@djfarrelly djfarrelly added this to the 0.12.1 milestone Nov 1, 2015
@djfarrelly
Copy link
Member

So sorry about the delay on this one @donut87 and @diresi! I really appreciate this awesome fix and will be pushing out 0.12.1 to npm ASAP 👍

@djfarrelly
Copy link
Member

Hi @donut87! I've pulled this down and have done a bunch of testing and when using Gmail, this will work on the first relay, but will fail on any any future relays. It seems the reconnection needed to be changed to config.pass && config.user.

I'm curious - why did you choose to instantiate a new SMTPConnection object in resetRelayConfiguration instead of letting it quit then reconnect with client.connect? I'm running into more issues when combined with the changes in #85 - Thanks for your help!

Edit: I'd love to know more about the SMTP error you were seeing as there might be some other things I could improve about the outgoing SMTP connection! Thanks 😉

@diresi
Copy link
Contributor

diresi commented Nov 2, 2015

@djfarrelly I've started this in #86, maybe the description there helps?

@djfarrelly
Copy link
Member

Ah ok, thanks @diresi - With the timeout issue I'm thinking a better flow for maildev might be create client > connect > login > send > quit vs. connect > login > send > quit > create client. Long term there could be a way to test if the connection was still active vs. quitting + re-connecting :) Thanks for your help!

@djfarrelly djfarrelly merged commit ff86415 into maildev:master Nov 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants