[MIRROR] Forward emails to all members of a Unix group
Find a file
2025-09-17 11:11:55 +01:00
src write README, extract hardcoded location into a constant 2025-09-17 11:11:55 +01:00
.gitignore initial commit 2025-09-17 08:37:28 +01:00
Cargo.lock initial commit 2025-09-17 08:37:28 +01:00
Cargo.toml initial commit 2025-09-17 08:37:28 +01:00
LICENCE initial commit 2025-09-17 08:37:28 +01:00
README.md write README, extract hardcoded location into a constant 2025-09-17 11:11:55 +01:00

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.