You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use protonmail bridge as mailserver for sending emails from overleaf. Protonmail uses self-signed certificates, but overleaf seems to not take the relevant environment variable into account.
I have setup protonmail such that its SMTP is available through a docker network called protonmail-bridge on port 25. I have tested this and sent a test mail successfully both with telnet and a small node.js script that uses nodemailer from inside the running sharelatex container. That means nodemailer can see and use protonmail bridge from the sharelatex container.
The correct environment variables for overleaf to use protonmail are then (as per the wiki, replacing SHARELATEX with OVERLEAF)
OVERLEAF_EMAIL_SMTP_HOST: "protonmail-bridge"
OVERLEAF_EMAIL_SMTP_PORT: 25
# https://nodemailer.com/smtp/#tls-options
# causes to use STARTTLS if available
OVERLEAF_EMAIL_SMTP_SECURE: "false"
# allows self-signed certificates
OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH: "false"
# allows using STARTTLS if available
OVERLEAF_EMAIL_SMTP_IGNORE_TLS: "false"
The crucial point is OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH: "false" to allow self-signed certificates, which protonmail requires. However, using this environment I still get a "self-signed certificate" error when trying to send a test mail from overleaf
[2024-03-18 15:23:44] DEBUG [NqNh8DzXZGA] Resolved protonmail-bridge as 172.24.0.2 [cache miss]
[2024-03-18 15:23:44] INFO [NqNh8DzXZGA] Connection established to 172.24.0.2:25
[2024-03-18 15:23:44] ERROR [NqNh8DzXZGA] self-signed certificate
[2024-03-18 15:23:44] DEBUG [NqNh8DzXZGA] Closing connection to the server using "end"
[2024-03-18 15:23:44] ERROR Send Error: self-signed certificate
[2024-03-18 15:23:44] INFO [NqNh8DzXZGA] Connection closed
[2024-03-18 15:23:44] INFO [NqNh8DzXZGA] Connection closed
I think I have pinpointed the issue to this line, where parts of the fields of the emailParameters are extracted and used to create a nodemailer client. However, the tls field -- which is set according to OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTHhere -- is not extracted. This means that the created nodemailer client does not take the value of OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH into account and it is impossible to use self-signed certificates.
Steps to Reproduce
supply protonmail bridge on a docker network and make it visible to the sharelatex container.
start overleaf container with above environment variables
trigger any action to send an email from overleaf, e.g. send a confirmation email when creating a new user
Expected Behaviour
The email is successfully sent
Observed Behaviour
Overleaf says Something went wrong. Please try again.
The mail log shows the following error: Send Error: self-signed certificate
Context
I am unable to use overleaf as I am required to use protonmail for secure communication with our users.
The text was updated successfully, but these errors were encountered:
I want to use protonmail bridge as mailserver for sending emails from overleaf. Protonmail uses self-signed certificates, but overleaf seems to not take the relevant environment variable into account.
I have setup protonmail such that its SMTP is available through a docker network called
protonmail-bridge
on port 25. I have tested this and sent a test mail successfully both with telnet and a small node.js script that uses nodemailer from inside the running sharelatex container. That means nodemailer can see and use protonmail bridge from the sharelatex container.The correct environment variables for overleaf to use protonmail are then (as per the wiki, replacing
SHARELATEX
withOVERLEAF
)The crucial point is
OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH: "false"
to allow self-signed certificates, which protonmail requires. However, using this environment I still get a "self-signed certificate" error when trying to send a test mail from overleafI think I have pinpointed the issue to this line, where parts of the fields of the
emailParameters
are extracted and used to create a nodemailer client. However, thetls
field -- which is set according toOVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH
here -- is not extracted. This means that the created nodemailer client does not take the value ofOVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH
into account and it is impossible to use self-signed certificates.Steps to Reproduce
Expected Behaviour
The email is successfully sent
Observed Behaviour
Overleaf says
Something went wrong. Please try again.
The mail log shows the following error:
Send Error: self-signed certificate
Context
I am unable to use overleaf as I am required to use protonmail for secure communication with our users.
The text was updated successfully, but these errors were encountered: