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

README: clarify that direct TLS for SMTP is not supported, STARTTLS is. #650

Merged
merged 1 commit into from
Jun 6, 2023

Commits on May 30, 2023

  1. README: clarify that direct TLS for SMTP is not supported, STARTTLS is.

    The current implementation of the stash-box email package uses the
    smtp.SendMail function which is part of the go standard library. But
    this function only supports plain tcp connections and upgrades them
    through STARTTLS. net/smtp has no function that can establish a TLS/TCP
    connection (aka SMTPS).
    
    When stash-box is configured to use a TLS port for email, it initiates a
    plain tcp connection waiting for the SMTP server to start an SMTP
    handshake. But the SMTP(S) server is expecting a TLS handshake so
    stash-box hangs indefinitely until the TCP connection times out at which
    point it returns "EOF". This is confusing and time-consuming for
    administrators to investigate. Hopefully, this README clarification can
    help avoid this confusion in the future.
    
    Ultimately, if someone wants to put in the effort to properly implement
    SMTPS support, it can be done with a higher-level package such as
    emersion/go-smtp.
    
        https://pkg.go.dev/github.com/emersion/go-smtp#DialTLS
    aghoulcoder committed May 30, 2023
    Configuration menu
    Copy the full SHA
    96c492d View commit details
    Browse the repository at this point in the history