- Shell 100%
| bin | ||
| config | ||
| scripts | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
iredctl
A command-line interface to iRedMail administration.
background:
iRedMail (https://www.iredmail.org/) is a collection of open source mail servers and utlities that are all configured to share a single configuration database. It's really nifty, and works quite well.
The package is free and open source, but the project funds itself by charging for its integrated web admin portal software. The amount they charge is reasonable for enterprise software, but is out of reach for home use or small-scale installations. They absolutely deserve credit for being really good about documenting how to admin the system manually, without the paid portal software.
If you can afford to pay for the iRedAdmin Pro web interface, or you're using iRedMail in a context where you can get your employer or client to pay for it, you should totally do that.
For the rest of us, there's this package of command-line scripts that I use for managing my iRedMail configs.
cautions:
iredctl must run as root; it needs root privileges to look up the database credentials.
iredctl modifies the iRedMail database directly; there is no 'undo' for any of this.
iredctl should work on any OS supported by iRedMail, but only with MySQL/MariaDB; extending it to support Postgres-based installations should be relatively simple, but I don't have one around to test that with.
usage:
iredctl is made up of individual scripts that each perform a specific task; the iredctl frontend script is available to provide a unified way of calling each of those individual scripts. This means there are two ways of invoking each function:
Run the script directly:
iredctl/scripts/add_alias.sh alias@domain.name address@domain.name
Use the iredctl frontend:
iredctl/bin/iredctl alias add alias@domain.name address@domain.name
The commands available in the current version are:
- alias add [alias address] [target address]
- alias delete [alias address] [target address]
- alias show [domain]
- catchall add [domain] [target address]
- catchall delete [domain] [target address]
- domain show
- forward add [alias address] [target address]
- forward delete [alias address] [target address]
- forward show [domain]
- list add [list address]
- list delete [list address]
- list info [list address]
- list show [domain]
- list subscribe [list address] [subscriber address]
- list subscribers [list address]
- list unsubscribe [list address] [subscriber address]
- list update [list address] [config update]
- user show [domain]
Things the free admin web portal (iRedAdmin) does fine, so are low priority for iredctl to support:
- domain add
- domain delete
- user add
- user delete
clone install:
To run the absolute latest code here, you can clone this repository with:
cd /opt
git clone https://forge.full0fstars.net/Public/iredctl.git
Update the clone with:
cd /opt/iredctl
git pull
release install:
New versions are released each time new functionality is added or a significant bug is fixed; they are available on the public repository at https://forge.full0fstars.net/Public/iredctl/releases.
The pro-style way to use this repository would be to install a versioned release then update a symlink to point to the latest version:
export IREDCTL_VERSION='1.0.9'
cd /opt
rm -f iredctl
wget https://forge.full0fstars.net/Public/iredctl/archive/iredctl-${IREDCTL_VERSION}.tar.gz
tar -zxvf iredctl-${IREDCTL_VERSION}.tar.gz
rm -f iredctl-${IREDCTL_VERSION}.tar.gz
mv iredctl iredctl-${IREDCTL_VERSION}
ln -s iredctl-${IREDCTL_VERSION} iredctl
configure:
iredctl should not need any configuration; since iRedMail installs into known locations, iredctl can read the credentials it needs directly from iRedMail's config files.
It's convenient, but not necessary, to add an alias to the root .bashrc file:
alias iredctl='/opt/iredctl/bin/iredctl'
contributing:
The issue tracker and pull requests are available to Constellation members on the internal repository.