On 29.03.2017 06:41, Mark Constable wrote:> FWIW this took me days to get right, and still needs tinkering, but it
> might make for a good starting point for anyone else needing something
> similar (ie; I don't use or need the overhead of spamassassin or
rspamd).
>
> https://gist.github.com/markc/eeeb66ce30ea805af62631656cf86c4d
>
> Any comments or corrections on that page would be appreciated.
https://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Extprograms
"Directly forked programs are executed with a limited set of environment
variables: HOME, USER, SENDER, RECIPIENT and ORIG_RECIPIENT. Programs
executed through the script-pipe socket service currently have no
environment set at all. "
Just thought I'd mention this, since it might help making your script
considerably easier. Esp. the HOME variable, as that should be set to
the mail user's home.
Aki