The latest version of the script `setup.sh` is included in the `docker-mailserver` repository. Get the last version to the script by copying this command in your console: ```sh wget -q -O setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh ``` Or if you use curl: ```sh curl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh ``` Run `./setup.sh` without arguments and you'll get some usage informations: ```sh Usage: ./setup.sh [-i IMAGE_NAME] [-c CONTAINER_NAME] [args] OPTIONS: -i IMAGE_NAME The name of the docker-mailserver image, by default 'tvial/docker-mailserver:latest'. -c CONTAINER_NAME The name of the running container. SUBCOMMANDS: email: ./setup.sh email add ./setup.sh email update ./setup.sh email del ./setup.sh email restrict [] ./setup.sh email list alias: ./setup.sh alias add ./setup.sh alias del ./setup.sh alias list quota: ./setup.sh quota set [] ./setup.sh quota del config: ./setup.sh config dkim (default: 2048) ./setup.sh config ssl debug: ./setup.sh debug fetchmail ./setup.sh debug show-mail-logs ./setup.sh debug inspect ./setup.sh debug login ``` ## email * `./setup.sh email add []`: Add an email-account (\ is optional) * `./setup.sh email update []`: Change the password of an email-account (\ is optional) * `./setup.sh email del `: delete an email-account * `./setup.sh email restrict []`: deny users to send or receive mail. You can also list the respective denied mail-accounts. * `./setup.sh email list`: list all existing email-accounts ## alias * `./setup.sh alias add `: add an alias(email) for an email-account(recipient) * `./setup.sh alias del `: delete an alias * `./setup.sh alias list`: list all aliases ## quota * `./setup.sh quota set []`: define the quota of a mailbox (quota format e.g. 302M (B (byte), k (kilobyte), M (megabyte), G (gigabyte) or T (terabyte))) * `./setup.sh quota del `: delete the quota of a mailbox ## config * `./setup.sh config dkim (default: 2048)`: autoconfig the dkim-config with an (optional) keysize value * `./setup.sh config ssl`: generate ssl-certificates ## debug * `./setup.sh debug fetchmail`: see [wiki](https://github.com/tomav/docker-mailserver/wiki/Retrieve-emails-from-a-remote-mail-server-%28using-builtin-fetchmail%29#debugging) * `./setup.sh debug fail2ban `: omitt all options to get a list of banned IPs, otherwise unban the specified IP. * `./setup.sh debug show-mail-logs`: show the logfile contents of the mail container * `./setup.sh debug inspect`: show infos about the running container * `./setup.sh debug login `: run a command inside the mail container (omit the command to get shell access)