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

Allow unencrypted PLAIN and LOGIN smtp authentication #344

Merged
merged 7 commits into from
Oct 22, 2024

Commits on Oct 22, 2024

  1. Add support for PLAIN authentication without encryption

    Implemented a new SMTPAuthPlainNoEnc option to allow PLAIN authentication over unencrypted connections. Refactored the PlainAuth function to accept an additional allowUnencryptedAuth parameter. Updated relevant tests to cover the new authentication method.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    f5531ea View commit details
    Browse the repository at this point in the history
  2. Add support for unsecured SMTP LOGIN auth

    Implemented an option to allow SMTP LOGIN authentication over unencrypted channels by introducing a new `SMTPAuthLoginNoEnc` type. Updated relevant functions and tests to handle the new parameter for unsecured authentication.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    3c29f68 View commit details
    Browse the repository at this point in the history
  3. Add 'skipTLS' parameter to auth functions in tests

    Updated PlainAuth and LoginAuth calls in smtp_test.go and example_test.go to include a 'skipTLS' boolean parameter. This ensures consistent function signatures throughout the test cases and examples.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    2bd9504 View commit details
    Browse the repository at this point in the history
  4. Add tests for PlainAuth and LoginAuth without encryption

    Introduced new test functions TestAuthPlainNoEnc and TestAuthLoginNoEnc in smtp_test.go to verify behaviors of PlainAuth and LoginAuth without TLS encryption. These tests ensure that authentication mechanisms handle non-encrypted and diverse server configurations correctly.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    e2ed5b7 View commit details
    Browse the repository at this point in the history
  5. Handle client close errors in SMTP tests

    Update defer statements to log errors if client fails to close in smtp_test.go. Additionally, add a return statement to avoid further errors after a failed SendMail operation.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    df1a141 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f79c1b8 View commit details
    Browse the repository at this point in the history
  7. Change error log to debug log in client_test.go

    Updated the log level from error to debug for the client.Close() call failure in client_test.go. This change helps reduce noise in test output when the server connection fails.
    wneessen committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    c7d0a03 View commit details
    Browse the repository at this point in the history