Repository navigation
Add TLS support for incoming mails - #435
Conversation
|
@djfarrelly, @soulteary can you consider this PR 👀? If it's good stuff, than several people would be happy as it would solve the TLS support topic. If not, any feedback to @sharat87 may unlock this. |
| logger: false, | ||
| hideSTARTTLS: true, | ||
| disabledCommands: user && password ? ['STARTTLS'] : ['AUTH'] | ||
| disabledCommands: user && password ? [] : ['AUTH'] |
There was a problem hiding this comment.
It looks like a default behavior has been modified here, and there may be some compatibility issues.
Would it be better to handle a separate config configuration based on the secure status? Perhaps a simple discussion is needed here?
There was a problem hiding this comment.
Hey, thanks for checking this out. Good point. I think something like this would be more backwards compatible:
disabledCommands: user && password ? (isSecure ? [] : ['STARTTLS']) : ['AUTH']
I can push this change if it looks okay.
There was a problem hiding this comment.
This looks good to me - I'll just add this change and get this merged!
| disabledCommands: user && password ? [] : ['AUTH'] | |
| disabledCommands: user && password ? (isSecure ? [] : ['STARTTLS']) : ['AUTH'] |
| cert: certFilePath ? fs.readFileSync(certFilePath) : null, | ||
| key: keyFilePath ? fs.readFileSync(keyFilePath) : null, |
There was a problem hiding this comment.
isn't maildev currently using self signed certs for this? Can we keep this behavior as a fallback?
There was a problem hiding this comment.
I don't think it does. From what I can tell from my understanding of the code, here's any support for SSL, self-signed or not, currently. So this shouldn't be breaking any existing configurations.
djfarrelly
left a comment
There was a problem hiding this comment.
This looks great - I'll get the additional change that @soulteary and @sharat87 suggested on the main branch
| logger: false, | ||
| hideSTARTTLS: true, | ||
| disabledCommands: user && password ? ['STARTTLS'] : ['AUTH'] | ||
| disabledCommands: user && password ? [] : ['AUTH'] |
There was a problem hiding this comment.
This looks good to me - I'll just add this change and get this merged!
| disabledCommands: user && password ? [] : ['AUTH'] | |
| disabledCommands: user && password ? (isSecure ? [] : ['STARTTLS']) : ['AUTH'] |
Fixes #182
Fixes #429
This PR adds support for TLS for incoming SMTP connections. We add the following three new arguments to configure support for this. Unless the
--incoming-secureoption is set, absolutely no change should be there from status quo.--incoming-secureMAILDEV_INCOMING_SECURE--incoming-cert <path>MAILDEV_INCOMING_CERT--incoming-key <path>MAILDEV_INCOMING_KEYThe contribution guidelines speak of checking lint result, which I've just done. Let me know if you need anything else from me to make this PR more aligned.
Thank you for all the tremendous work on maildev! 🙏