Mail configuration
How can I configure the e-mail settings?
When I want to login without password, it's asking for the code from the e-mail.
That should probably disabled for self-hosted version so we always authenticate with password.
@aonnikov but what about notifications? I saw some issue where someone said there will be an option to add own SMTP data in 2-4 weeks. It was written 3 months ago. What about that? For now it's not possible to login on a new device what is funny
Hi, I just installed huly on my server and the e-mail topic was the first thing I noticed is missing. I suggest using environment variables to use for SMTP settings?
@aonnikov but what about notifications? I saw some issue where someone said there will be an option to add own SMTP data in 2-4 weeks. It was written 3 months ago. What about that? For now it's not possible to login on a new device what is funny
It is still in our plans, but I don't think it will be done very soon.
a login with a password is always possible. There is a button to show the password field in the login form.
However, for people who are not convinced of the need of AWS SES (or hate to wait the approval of production usage from amazon), another approach is possible. You just have to write a microservice/ docker service that exposes a /send post method (see https://github.com/hcengineering/platform/blob/develop/services/ses/pod-ses/src/main.ts) and map it to the other docker services (account and transactor). This should be straightforward.
You can configure Mail service to enable OTP Login using the below configuration.
apiVersion: apps/v1
kind: Deployment
metadata:
name: otp-mail-service
namespace: huly
labels:
app: otp-mail-service
spec:
replicas: 1
selector:
matchLabels:
app: otp-mail-service
template:
metadata:
labels:
app: otp-mail-service
spec:
containers:
- name: otp-mail-service
image: hardcoreeng/mail
ports:
- containerPort: 8097
env:
- name: PORT
value: "8097"
- name: SMTP_HOST
value: ""
- name: SMTP_PORT
value: ""
- name: SOURCE
value: "ses configured domain: [email protected]"
# You can also configure for SES:
- name: SMTP_USERNAME
value: "ACCESS KEY"
- name: SMTP_PASSWORD
value: "SECRETEKEY"
- name: SMTP_DEBUG_LOG
value: "true"
- name: MAIL_AUTH_TOKEN
value: "SOME TOKEN"
---
apiVersion: v1
kind: Service
metadata:
name: otp-mail-service
namespace: huly
spec:
selector:
app: otp-mail-service
ports:
- protocol: TCP
port: 8097
targetPort: 8097
Add the following env's in account and transactor deployment file.
- env: - name: MAIL_URL value: http://otp-mail-service.huly.svc.cluster.local:8097