Install BashEmail on DirectAdmin

Summary: One command installs BashEmail on a DirectAdmin server running Exim, with an admin plugin and a Spam Quarantine page for each user.

BashEmail installs on a DirectAdmin server running Exim with one command, as root, and adds itself as a DirectAdmin plugin.

Requirements

RequirementDetail
Accessroot on the server
Processor64-bit x86 (x86_64)
Systemsystemd and curl installed
Mail serverExim or Postfix, already running
Diskat least 500 MB free on /opt (the installer warns below this)
Licencean install token from your BashPilot account, valid for one hour

Check your Exim configuration first

BashEmail joins the mail path through DirectAdmin's own Exim include files, so it never edits /etc/exim.conf. Older CustomBuild Exim configurations do not call those files. The installer checks this, and if they are missing it installs in watch-only mode and tells you. To update the Exim configuration, run this in CustomBuild, then run the installer again:

shell
cd /usr/local/directadmin/custombuild
./build exim_conf

Install

Copy the install command from your BashPilot account. It contains your install token, which works once and expires after one hour. Run it as root:

shell
curl -sSL https://bashemaildownloads.bashpilot.com/install-bashemail.sh | bash -s -- --install-token YOUR_TOKEN

What the installer does

  • Checks the requirements before anything is downloaded or changed.
  • Downloads the agent and verifies its checksum. Nothing is installed if the check fails.
  • Activates your licence with the install token.
  • Puts BashEmail in the mail path using the panel's own extension points. It never edits the main mail server configuration file, so panel updates do not undo it.
  • Turns the panel's own spam scanner off, so two filters do not judge the same mail. Uninstalling turns it back on.
  • Installs the dashboard into the panel.
  • Checks that the mail server is still valid and running before it finishes.

Installer options

OptionWhat it does
--install-token <token>Required for a first install. Ignored on a server that is already activated.
--no-wireInstall everything but leave the mail path untouched.
--keep-spamassassinInstall without turning off the panel's own spam scanner. Only use this if you have a specific reason to run both.
--uninstallRemove BashEmail, see Uninstall BashEmail.

Check it is running

shell
systemctl status bashemail-agent
/opt/bashemail/bashemail-agent license

Stopping a hacked sender

To stop a user's account from sending, BashEmail sets DirectAdmin's own daily send limit for that user to zero. When it is released, the limit you had before is put back. A limit somebody else set is never lifted.

Where to find it

  • You: DirectAdmin > Admin Level > BashEmail
  • Your users: Spam Quarantine at user level, showing only mail for their own domains

Last updated · Applies to BashEmail