huly-selfhost icon indicating copy to clipboard operation
huly-selfhost copied to clipboard

Mail configuration

Open fendle opened this issue 1 year ago • 6 comments

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.

fendle avatar Sep 14 '24 15:09 fendle

That should probably disabled for self-hosted version so we always authenticate with password.

aonnikov avatar Sep 20 '24 05:09 aonnikov

@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

davidkobielski avatar Oct 03 '24 19:10 davidkobielski

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?

DamianRyse avatar Oct 08 '24 14:10 DamianRyse

@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.

aonnikov avatar Oct 11 '24 15:10 aonnikov

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.

volkovmqx avatar Dec 14 '24 14:12 volkovmqx

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

AzarOPS avatar Jun 11 '25 09:06 AzarOPS