On Fri, Aug 16, 2019 at 12:02:29AM +0200, Jakub Jirutka wrote:
> Hi Gilles,
> I'm testing OpenSMTPD on Alpine Linux (musl libc) built from the last
> commit from the portable branch [1] and filters don't work.
> The filter script gets the following lines on the start of OpenSMTPD:
>     config|smtp-session-timeout|300\n
>     config|ready\n
> Right after reading "config|ready" I print the following lines to STDOUT:
>     register|filter|smtp-in|data-line\n
>     register|filter|smtp-in|commit\n
>     register|ready\n
> No problem so far. But when I send a message via sendmail(1), OpenSMTPD
> processes it, but doesn't feed any input to the script. The script is
> running and when I kill OpenSMTPD, it's gracefully exited (STDIN??? is
> closed, the script finishes).
> I've even tried to register all the reporters and filters as
> filter-rspamd do, i.e. emit exactly the same output, but no change.
> My smtpd.conf:
>     table aliases file:/etc/smtpd/aliases
>     filter "my-filter" proc-exec "/etc/smtpd/filter.sh"
>     listen on lo filter "my-filter"
>     action "local" mbox alias <aliases>
>     match for local action "local"
> Jakub
> [1]:
> https://github.com/OpenSMTPD/OpenSMTPD/commit/772da22936c8d80f7ad3284ea7e5bdbfdbee2efb

Are you sure you're not enqueuing the mail through the local socket ?

Note that 'listen on lo0' is a network listener and does not catch mails
that are submitted through the 'mail' command for instance.

Try adding 'listen on socket' and let me know if it works better.

> P.S.: misc+get-04...@opensmtpd.org doesn't work.

never used it, i'll look

Gilles Chehade                                                 @poolpOrg

https://www.poolp.org            patreon: https://www.patreon.com/gilles

Reply via email to