Skip to content

NethServer/ns8-piler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

206 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ns8-piler

Start and configure a piler instance.

Install

Instantiate the module with:

add-module ghcr.io/nethserver/piler:latest 1

The output of the command will return the instance name. Output example:

{"module_id": "piler1", "image_name": "piler", "image_url": "ghcr.io/nethserver/piler:latest"}

Configure

Let's assume that the piler instance is named piler1.

Launch configure-module, by setting the following parameters:

  • host: a fully qualified domain name for the application
  • http2https: enable or disable HTTP to HTTPS redirection
  • lets_encrypt: enable or disable Let's Encrypt certificate

Example:

 api-cli run configure-module --agent module/piler1 --data - <<EOF
{
      "host": "piler.domain.com",
      "http2https": true,
      "lets_encrypt": false,
      "mail_server": "c990d0d0-6216-4651-9d0b-d393117d0f7e"
    }
EOF

The above command will:

  • start and configure the piler instance
  • configure a virtual host for traefik to access the instance

Get the configuration

You can retrieve the configuration with

api-cli run get-configuration --agent module/piler1 --data null | jq
{
  "host": "piler.domain.com",
  "http2https": true,
  "lets_encrypt": false,
  "mail_server": "c990d0d0-6216-4651-9d0b-d393117d0f7e",
  "mail_server_URL": []
}

Custom configuration files

You can modify the configuration by adding a config-site.php.local file to the folder /home/piler1/.config/state/templates, if the files is present they are used instead of the default one and they are included in the backup of the module

runagent -m piler1
# copy the source file to be customized
cp ../templates/config-site.php templates/config-site.php.local 
# edit the file
nano template/config-site.php.local
# restart the service
systemctl restart --user piler.service

Uninstall

To uninstall the instance:

remove-module --no-preserve piler1

Running tests locally

This module uses the NS8 standard testing infrastructure. For instructions on how to run the test suite locally, refer to the Running tests locally section of NS8 GitHub Actions.

send email to piler

Piler is waiting email on a TCP port on a random port(>20000/tcp), to send email to the archive system you need

  • Bcc email of your domain to archive@piler.domain.com
  • adapt your email server to send email to piler.domain.com on the custom smtp port

This can be done by adapting the /etc/postfix/transport/

piler.domain.com smtp:piler.domain.com:20001

  • postmap the configuration file (if needed) : postmap /etc/postfix/transport
  • restart postfix : systemctl restart postfix

Import emails to piler

Previous emails are sent automatically one time to piler after the first configuration, but if you want to launch manually the synchronisation, you can trigger this service in the terminal:

runagent -m piler1 import-emails

Recreate The Index Data Files

This is a troubleshooting task, use it only when you have to or you are advised to rebuild the manticore index from scratch.

Piler relies heavily on the manticore index data. The reindex utility is for healing it if anything goes wrong.

runagent -m piler1 podman exec -w /var/piler/imap piler-app reindex -a -p

Piler understands and manage duplicated emails.

About

Configure mail-piler from janos Suto to ns8

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Generated from NethServer/ns8-kickstart