Loomio's reply by email feature using *nix pipes.
Allows participants to post comments on Loomio via email, by replying to
the notification special address. The loomio_pipe
script will read
the email from standard input and post it to your Loomio's API address.
Loomio uses an special Reply-To address with these fields concatenated as a query string:
- u:
User.id
- k:
User.email_api_key
- d:
Discussion.id
The address looks like:
u=1&k=1111111111111111&[email protected]
Which are processed by a dedicated nodejs SMTP server and posted as JSON requests to loomio's API.
loomio_pipe
receives the email from any SMTP server via standard input
and posts it to loomio's API.
To use loomio_pipe
, you'll need to merge our pipe_to_api branch.
This makes Loomio craft Reply-To addresses that your regular SMTP server
can recognize and pipe to loomio_pipe
:
loomio+u=1&k=1111111111111111&[email protected]
Make sure Postfix uses the plus sign as recipient_delimiter:
# postconf -e recipient_delimiter='+'
# postfix reload
Add an alias for loomio addresses that runs loomio_pipe
:
# echo 'loomio: "|/path/to/loomio_pipe https://your.loomio.in"' >>/etc/postfix/aliases
# newaliases
Note: On some systems, the aliases
file is on /etc/aliases
.
Check your postfix config if unsure: postconf alias_maps
- Verify GPG signatures and drop emails not signed correctly
- Decrypt with GPG if we have a key
- What happens with plain text emails?