An instance where people sign in with an email address sends email to confirm addresses and reset passwords. Squad sends it through an SMTP server you already have, such as your mail provider’s or a sending service.
With usernames, an instance needs no email.
Settings
Заголовок раздела «Settings»Set these with your server’s details.
FLUXER_EMAIL_DELIVERY=smtpFLUXER_EMAIL_SMTP_HOST=smtp.example.comFLUXER_EMAIL_SMTP_PORT=587FLUXER_EMAIL_SMTP_USERNAME=fluxer@example.comFLUXER_EMAIL_SMTP_PASSWORD_FILE=/run/secrets/smtp-passwordFLUXER_EMAIL_FROM_EMAIL=noreply@chat.example.com- Port 587 uses STARTTLS and port 465 uses TLS from the start. You can also set
FLUXER_EMAIL_SMTP_TLS_MODEtoimplicit,starttls,opportunisticornonewhen you want to choose the encryption yourself. - Put the password in a Kubernetes Secret, or in a file with
FLUXER_EMAIL_SMTP_PASSWORD_FILEas in secrets in files. Leave both out for a relay that lets Squad send without signing in. - Without
FLUXER_EMAIL_FROM_EMAIL, Squad sends fromnoreply@and your domain. - When your SMTP server’s certificate comes from your own CA, mount the CA’s PEM file and set
FLUXER_NODE_EXTRA_CA_CERTSto its path. With rexctl,rexctl email set --ca-file ca.pemdoes both of these steps.
Other email settings include a fallback server for some recipient domains.
The admin panel can also save the SMTP server, the sender and whether email is on, in “Email delivery” under “Instance Config”. A value saved there wins over fluxer.env.
Test it
Заголовок раздела «Test it»In the admin panel, open “Email delivery” under “Instance Config”, enter your own address under “Send a test message to (optional)” and press “Save and test SMTP”. It connects with the saved settings and shows what your server said.
With rexctl, rexctl email test sends a test email, or one to the address you pass. rexctl email shows the current settings and offers to change them.
Until email works, you can create a reset link for anyone who is locked out.