Logo
ХелпдескУправление знаниямиБизнесуТарифыЧто такое KCS?Блог
Русский
Личный кабинет
Настройка системы
© 2023 - 2026 ООО «Свормика». Swarmica - Платформа управления знаниями и ресурсами техподдержки. Версия: 6.1.2

#1624: How to Configure an SMTP Email Channel in Swarmica

Отредактирована: сегодня

By default, only the IMAP channel for email is available in Swarmica.

This documentation contains instructions for setting up an SMTP channel for email.

Instructions

Before setting up the SMTP channel, make sure that the MX record is set up for the Swarmica hostname in DNS.

  1. Connect to the Swarmica server via SSH as the root user.
  2. Go to the /root/swarmica folder:
cd ~/swarmica
  1. Create a backup of the docker-compose.yml and .env files:
mkdir backup; cp -a .env docker-compose.yml ./backup
  1. Add the following postfix section for the corresponding service in docker-compose.yml:
  postfix:
    <<: *django
    restart: always
    depends_on:
      - postgres
      - redis
    volumes:
      - swarmica_logs:/swarmica/swarmica/logs:z
      - swarmica_ugc:/swarmica/swarmica/attachments/:z
    env_file:
      - .env
    ports:
      - "25:25"
    command: /start-postfix
    labels:
      - "traefik.enable=false"
  1. Add SMTP settings to the .env file:
EMAIL_SERVER_HOSTNAME=<SWARMICA_HOSTNAME>
SMTP_SERVER=<SMTP_RELAY>
SMTP_PORT=<SMTP_RELAY_PORT>
SMTP_USERNAME=<SMTP_RELAY_USER>
SMTP_PASSWORD=<SMTP_RELAY_USER_PASSWORD>
SMTP_NETWORKS=<ALLOWED_NETWORKS_CIDR>
SMTP_USE_TLS=<YES|NO>

You can use the same SMTP settings here as for the already configured SMTP Relay in Swarmica - Settings - SMTP Relay.

  1. Add the feature flag __smtp_email_channel to the .env file using this instruction.
  2. Restart Swarmica:
docker compose down; docker compose up -d
  1. Log in to the Swarmica UI as Administrator.
  2. Add the SMTP channel in Settings - Channels - Email - Create - Redirect (SMTP):

  1. In the window that appears, specify the channel name, recipient email, and sender email (for example, support@example.tld) and click Save:

  1. On the SMTP channel settings page that opens, specify the Sender's name (for example, swarmica support), enable the channel, fill in the Outgoing server settings, or enable the system SMTP server (SMTP Relay) and click Save.