Skip to content

Mail server

This page is for staff Admins. The Mail server card, the first card in Settings › Integrations, says which server Adiutor sends email through: sign-in links, password resets, invitations, security notices and the emails about requests. Without one, nobody gets sign-in links, so set it up first.

The Mail server card after an example server was saved: server smtp.adiutor.dev, security STARTTLS, port 587, username support@adiutor.dev, the password left empty with the hint that a password is saved, sender name Adiutor Support, sender address support@adiutor.dev, and the Test and save mail server button.

On a new install the card says “No mail server is set up yet: until one is, nobody gets sign-in links, password resets or invitations.” Set one up with the steps below, with the details your email provider gives you.

  1. Open Settings › Integrations.
  2. Changing the mail server needs your second step from the last 15 minutes. If the Mail server card ends with “Changing the mail server needs you to confirm it’s you first.” instead of its button, press Confirm it’s you before you type anything. Afterwards you come back to the card.
  3. Fill in Server: the server’s host name, for example smtp.adiutor.dev.
  4. Choose the Security: TLS (“Encrypted from the start, usually on port 465.”), STARTTLS (“Encrypted once connected, usually on port 587.”) or None (“Not encrypted. In production, only for a mail server on this computer.”). A new setup starts with TLS.
  5. Fill in the Port, or leave it empty for the usual one: 465 with TLS, 587 with STARTTLS, 25 without. A port is a number from 1 to 65535.
  6. Fill in the Username and Password. Leave the username empty for a server that takes email without signing in; a password is then ignored.
  7. Fill in the Sender name (optional; “Shown with the address in mail apps, e.g. Adiutor.”) and the Sender address (“An address on a domain you control, which this server may send from.”).
  8. Press Test and save mail server.

You see “Mail server saved. A test email reached you through it.”

Above the button, the card says “Saving sends a test email to you through this server, then tells every staff Admin, you included.” In order:

  1. Adiutor sends a test email to your own address through the new settings. It says “This mail server works”.
  2. Only if the email goes out, the settings are saved. Otherwise nothing changes and what you typed stays in the form.
  3. Every active staff Admin, you included, gets the email “Adiutor sends email through another mail server” (headed “The mail server changed”), which names the new server and its port. It goes through the previous mail server, because the new one might not be one you trust. With no previous server, or if that one fails, it goes through the new server.

Whoever controls the mail server can read the sign-in links and codes it sends, which is why Admins are told.

If the test fails, you read which kind of problem it was, never the server’s own reply:

  • “The mail server couldn’t be reached. Check its name and port.”
  • “The mail server took too long to answer. Try again, or check its name and port.”
  • “The connection couldn’t be secured. Check the security and the port.”
  • “The mail server refused the username or the password. Check them.”
  • “The mail server refused the sender’s address or yours. Check that it may send from the sender’s address.”
  • “The mail server refused the test email. Check its settings with your provider.”

The password is never shown again. When one is saved, the field says “A password is saved. Leave this empty to keep it while the server, port and username stay the same.” Leave it empty to keep it. Change the server, security, port or username, and you give the password again: “Give the password again: a saved one is only kept for the same server, port and username.”

In production, None is refused unless the mail server is on the same computer: “Use TLS or STARTTLS: without them, the emails and the sign-in links in them would travel unencrypted.”

Whoever runs Adiutor can choose the mail server in its environment instead. When SMTP_URL is set, the card shows “Chosen in the server’s environment (SMTP_URL), so it can’t be changed here.” with the Server, Port, Security, Signs in as and Sender it uses, and no form. The password isn’t shown. If SMTP_URL is set but Adiutor can’t read the address in it, the card says only “The server’s environment chooses the mail server, but its address can’t be read.” Ask whoever runs Adiutor to check the variable.

When only EMAIL_FROM is set, the form stays, but the two sender fields give way to one locked Sender field: “Chosen in the server’s environment (EMAIL_FROM), so it can’t be changed here.” The variables are described in Email.

Alex Admin has the details the staff’s mail provider gave them. In Settings › Integrations, Alex fills in smtp.adiutor.dev, STARTTLS, port 587, the username [email protected] and its password, the sender name “Adiutor Support” and the sender address [email protected]. After Test and save mail server, Alex reads the test email in their own inbox. Alex and Gita GitHub, the other staff Admin, each get an email that the mail server changed.

Only staff Admins open Settings. Everyone else gets the “This page doesn’t exist or you don’t have access to it.” page.

  • Changing the mail server is recorded in the audit log as “Changed the mail server”, with the server and its port, never a password.
  • You can test and save 20 times an hour. After that you read, for example, “Too many attempts. Try again in 12 minutes.”
  • Email: the environment variables for the mail server and sender.
  • Emails: every email Adiutor sends.
  • Staff: who the staff Admins are.

Adiutor's code is released under the MIT License. The Adiutor name and logo aren’t covered by it; see the notice.

Set in Inter and JetBrains Mono, under the SIL Open Font License (Inter, JetBrains Mono).