Sign inSign up

probesys38/agentj_relay

By probesys38

•Updated over 1 year ago

Delivery mail server for the AgentJ stack

Image
0

2.1K

probesys38/agentj_relay repository overview

⁠AgentJ dockerized repository

This is the Docker stack to set up a fully functional AgentJ antispam system at a glance.

⁠Introduction

The AgentJ Docker stack is composed of the following services:

  • db: a MariaDB instance, it keeps track of the mail headers and other information needed to manage the e-mails life cycle (sender, recipient, amavis id, ...)
  • app: a Web UI that allows you to add and manage your domains and associated users as well as managing the incoming e-mails (block, release, white/black lists)
  • smtp: a Postfix instance that will receive the e-mails and forward them to the amavis container (Amavis/ClamAV/Spamassassin service)
  • amavis: a container running Amavis/Spamassassin and ClamAV services
  • logspout + syslogng: a Syslog-NG instance that will collect and centralize logs from the other containers
  • relay: an other Postfix instance, needed to avoid loops when forwarding the released or white-listed e-mails to their recipients(s)

⁠Get the sources

All you have to do is to clone the repository

git clone https://github.com/Probesys/agentj.git

then, cd to the cloned repository to configure a few variables:

cd agentj

⁠Configure

⁠Variables

Variables are defined in the .env.example. This file is just a template, you must copy and rename it to .env:

cp .env.example .env

Then the following runtime variables must be configured in the .env file:

VariableDefaultUse
VERSIONthis AgentJ latest prod version
COMPOSE_PROJECT_NAMElocalthis AgentJ instance name
DB_ROOT_PASSWORDsecretthe MariaDB instance root password
DB_NAMEagentjthe AgentJ database name
DB_USERagentjthe AgentJ database user name
DB_PASSWORDsecretthe AgentJ database password
IPV4_NETWORK172.42.42the AgentJ Docker default network
MAIL_HOSTNAMEaj.example.comthe mailname used in postfix configuration
MAIL_DOMAINNAMEexample.comthe domain name used in relay configuration
SUPER_ADMIN_USERNAMEadmindefault super admin login
SUPER_ADMIN_PASSWORDSup3rZECR37default super admin password
TZEurope/Paristhe containers default timezone
PROXY_PORT8090default listening port for web interface
PROXY_LISTEN_ADDR127.0.0.1default listening address for web interface
SMTP_PORT25default listening port for smtp server
SMTP_LISTEN_ADDR0.0.0.0default listening address for smtp server
OAUTH_AZURE_CLIENT_SECRETsecretclient secret if using Azure auth
OAUTH_AZURE_CLIENT_IDsecretclient ID if using Azure auth
ENABLE_AZURE_OAUTHfalseenable Azure OAuth
TRUSTED_PROXIES172.24.42.1default stack gateway
CLAMAV_AUTOSTARTtrueuse the ClamAV instance of this stack
CLAMAV_TCPADDRESS0.0.0.0remote ClamAV server IP address
CLAMAV_TCPPORT3310remote ClamAV server TCP port
⁠Network

The AgentJ antispam stack has its own Docker bridge and IPv4 subnet which defaults to 172.24.42.0/24 (configurable, see variables table above).

⁠Use

It is not recommended to launch the stack as root. We recommend you to create a dedicated docker user (make sure it belongs to the docker group). After you have set the above variables, you can start the stack with following commands:

docker-compose up -d

The Web UI will be available at http://hostname:8090⁠. The default login is admin and the default password is Sup3rZECR37.

⁠Details

⁠Volumes

When started, the AgentJ stack will create the following volumes:

  • amavis : the Amavis databases
  • applogs : the application logs (cron tasks)
  • clamav : the ClamAV signatures database
  • db : the MariaDB databases files
  • logs: the log files from all containers, centralized by the syslogng container
  • opendkim : DKIM signature and conf files
  • postqueue : the mail queue
⁠Communication matrix
from ↓ \ to →amavisappdbrelaysmtpsyslog
amavis (10024/tcp)--? → 3306/tcp-? → 10025/tcp? → 514/udp
app (8090/tcp)? → 9998/tcp-? → 3306/tcp???? → 514/udp-
db (3306/tcp)-----? → 514/udp
relay 25/tcp)-----? → 514/udp
stmp (25/tcp 10025/tcp)? → 10024/tcp-? → 3306/tcp? → 25/tcp? → 514/udp-
syslogng (514/udp)-----? → 514/udp

⁠Upgrade

Please read the dedicated documentation⁠ as well as releases notes before upgrading.

Generally speaking, the upgrade processes consists in the following:

docker-compose down
# Change VERSION variable in your `.nev` file
docker-compose up -d

⁠About

⁠License

This work is made available under the GNU Affero General Public License v3.0.

⁠Development

AgentJ is a Probesys⁠ project.

Tag summary

Content type

Image

Digest

sha256:47705364c…

Size

38.5 MB

Last updated

over 1 year ago

docker pull probesys38/agentj_relay