Skip to content

Commit

Permalink
Add Licence, readme and fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
awidegreen committed Oct 14, 2018
1 parent c100f40 commit 35424ee
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions LICENSE
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2018, Armin Widegreen <armin.widegreen@mail.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
109 changes: 109 additions & 0 deletions README.md
@@ -0,0 +1,109 @@
# vmail-rs

[![license](https://img.shields.io/badge/license-ISC-brightgreen.svg)](https://www.isc.org/downloads/software-support-policy/isc-license/)

`vmail-rs` is a command line tool and libary for managing a mail-server database
based on the great [HowTo](https://thomas-leister.de/en/mailserver-debian-stretch) ([german version](https://thomas-leister.de/mailserver-debian-stretch/))
from [Thomas Leister](https://thomas-leister.de) written in Rust.

## Prerequisites

Make sure you have a working setup as described in the tutorial as `vmail-rs`
relies on the described database scheme (MySQL or MariaDB).

Further, as `vmail-rs` is written in Rust, you should have a working
rustup/cargo setup.

# Installation

vmail-rs contains the cli tools `vmail-cli`


## Install from github

```
cargo install --git https://github.com/awidegreen/vmail-rs
```

## Build from sources

Clone the repo and run

```
cargo install
```
or the release version

```
cargo install --release
```

# Usage

vmail-rs uses Rust's [dotenv](https://docs.rs/crate/dotenv/) crate to create
environment configuration from a `.env` file.

Create a `.env` in the current directory containing the `DATABASE_URL`
configuration parameter.

```
DATABASE_URL=mysql://vmail:vmailpassword@localhost
```
Use the command help to get started, and see which subcommands exists.

```shell
vmail-cli --help
```

NOTE: all subcommands can also be shortcut'd. vmail-cli will automatically defer
the correct command: `vmail-cli u s` equals `vmail-cli user show`

## Subcommand `domain`

Available subcommands are:

* add
* help
* remove
* show

## Subcommand `user`

As the name suggests, this subcommand is used to mange the users/accounts within
the database. In order to add a new user, the associated domain need to exist.

Available subcommands are:

* add
* edit
* help
* password
* remove
* show

Use help for more information.


## Subcommand `alias`

In order to add a new alias, the associated user and domain need to exist.

Available subcommands are:

* add
* help
* remove
* show

Use help for more information.

# How to contribute

Create new issues if you find bugs or want to a new features. Pull requests are
very welcomed.

# License

Copyright (C) 2018 by Armin Widegreen

This is free software, licensed under the [ISC License](LICENSE).
2 changes: 1 addition & 1 deletion vmail-cli/Cargo.toml
Expand Up @@ -10,4 +10,4 @@ vmail-lib = { path = "../vmail-lib" }
failure = "0.1"
failure_derive = "0.1"
rand = "0.5"
sha-crypt = { path = "../../password-hashing/sha-crypt", features = ["include_simple"] }
sha-crypt = { git = "https://github.com/awidegreen/password-hashing.git", branch = "add_sha-crypt", features = ["include_simple"] }

0 comments on commit 35424ee

Please sign in to comment.