Universal ManageSieve protocol client. It can be used as CLI tool or library. It works in two modes: script and interactive.
The command naming convention is taken from common *nix tools, so it should be intuitive. However, there is some breakdown of the commands with examples below.
If you run sieveman without any arguments, it will start interactive mode. Keep in mind that you need to pass at least credentials as shown below.
When using any command you need to pass credentials. You can create a recursive alias for the sieveman command with the following options.
sieveman --host imap.example.com --username jdoe@example.com --password $(gpg -qd encrypted_password.txt.gpg)sieveman lsIt prints a list of all scripts with * (star) indicator for the active one.
Open-Xchange*
test_script.sieve
Run the command with --help flag to see all available options.
sieveman get Open-Xchange script.sieveIt will download Open-Xchange script and save it to local file named script.sieve. If file with the given filename exists, you can use --force flag to overwrite it.
You can use - (minus) character instead of the file name to print the output to console instead.
sieveman get Open-Xchange -sieveman put script.sieve Open-XchangeIt will put local script.sieve as Open-Xchange. If script with following name exists on the server it will be overwritten.
Run the command with --help flag to see all available options.
sieveman edit Open-XchangeIt will open Open-Xchange script in the $EDITOR and upload it to the server on saving.
sieveman activate Open-XchangeIt will activate Open-Xchange script on the server. Keep in mind that only one script can be active at a time.
sieveman deactivateIt will deactivate all scripts.
sieveman rm Open-XchangeIt will remove Open-Xchange script from server.
sieveman mv Open-Xchange test.sieveIt will rename Open-Xchange script to test.sieve without changing active status.
This is universal method to build a binary for any system and architecture. You need to have Go installed.
git clone https://github.com/wzykubek/sieveman && cd sievemanmakeOn Linux distributions you can also install it to specified PREFIX (default /usr/local) with ease.
sudo make installThis project is licensed under ISC license.