| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENCE | ||
| README.md | ||
groupfwd
An application that takes an email (by default, from stdin) and forwards it to all members of a Unix group with sendmail. Intended for use with Sieve Extprograms.
Note that, because Sieve Extprograms don't receive a PATH variable, this program expects the sendmail binary at a
hardcoded location, /usr/sbin/sendmail. You can change this location by editing the SENDMAIL_LOCATION constant in
lib.rs.
Building
Build dependencies:
- Cargo
Just build with Cargo, e.g.
$ cargo build --release
The executable will be located at target/release/groupfwd.
Usage
Runtime dependencies:
- sendmail (see above about expected location)
As a command line program:
$ cat email.eml | groupfwd wheel
Sends email.eml to all members of wheel.
$ groupfwd -f email.eml wheel
does the same as above.
As a Sieve filter:
Place the groupfwd binary in the directory specified by sieve_filter_bin_dir in your Dovecot config. Then, to use it
in your Sieve scripts,
require "vnd.dovecot.filter";
filter "groupfwd" "students";
will forward all incoming emails to members of the students group.