Skip to content

[Photos][Server] Cannot Connect Clear SMTP Postfix From Server #9513

@dinobagio

Description

@dinobagio

As discussed here:
https://discord.com/channels/948937918347608085/1478332406334488576

There is an issue when trying to connect a local Postfix relay in clear (port 25, no TLS)
Because here:
https://github.com/ente-io/ente/blame/b877d6530f66ee083a2ae3359c25f5cd6d67ff96/server/pkg/utils/email/email.go#L229

This function will auto upgrade with STARTTLS is proposed on ehlo by smtp server.

Online doc says:
Workaround: Use smtp.Client manually
If you need to avoid TLS entirely (e.g., for testing or internal servers), use smtp.Client and don’t call StartTLS.

As a consequence, we cannot enroll new users, because then it tries to STARTTLS and then verify a certificate it cannot verify since default postfix cert is non public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions