correct usage for Pigeonhole sieve message *redirect* to external server?

PGNet Dev pgnet.dev at gmail.com
Wed Sep 16 07:28:10 EEST 2020


On 9/15/20 9:08 AM, PGNet Dev wrote:
> what additional/different config is required to get the sieve processor to *send* that email?

'redirect' was the wrong action for this case.

as was 'pipe'.

an 'execute :pipe' action does the trick.

this

	report-spam.sieve
		require ["vnd.dovecot.pipe", "vnd.dovecot.execute", "environment", "variables"];
		execute :pipe "msmtp_send.sh" ["dovecotsubmit", "sieve at mx.example.com", "spam.learn at othermx.example.net"];
		stop;

with

	msmtp_send.sh
		#!/usr/bin/env bash
		export ACCT="$1"
		export FROM="$2"
		export TO="$3"
		export MSMTP="/usr/bin/msmtp"
		export DEBUG="--debug"
		${MSMTP} ${DEBUG} --account="${ACCT}" --from="${FROM}" "${TO}"
		exit 0

and setting up /etc/msmtprc, accountid = 'dovecotsubmit' to use my dovecot server's submission service+port

works.


More information about the dovecot mailing list