Thanks for the pointer. I also found other interesting command line options like the filter test. It also needed the -v or -d option together with -bf to actually see the promised result. And that looked all good.

So I went on and tried to test the filter loaded the regular way from the database with the -bm option. Together with -v I found the message

Sieve error: syntax error in line 2

somwhere in the terminal window.

When I commented out the second line (after the comment in the first line), the reported line number changed to 3. Somehow that reminded me of line endings. The database is fed from a web form entered in a browser on Windows, processed by an ASP.NET Core application running on Linux. I added code to filter out any \r characters, and that actually did the trick. Multiline web forms seem to have CRLF line endings, and the Exim documentation says that it wants LF-only filters.

So this is resolved, the filter text now contained the wrong line endings. The relevant change lies in my config tooling.

As a small wish: Those Sieve syntax error messages are a bit hard to get. It would be nice if they could be included in the regular log files. That would make debugging Sieve filters a lot easier. There doesn't seem to be a log selector for that.

-Yves


-------- Ursprüngliche Nachricht --------
Von: Jeremy Harris via Exim-users <[email protected]>
Gesendet: Mittwoch, 7. Oktober 2020, 15:45 MESZ
Betreff: [exim] Sieve filter not working properly anymore, how to debug?

On 07/10/2020 14:14, Yves Goergen via Exim-users wrote:
How can I debug [...] Sieve filter in Exim? I thought that the

Command line "-d" facilities.  Depending how you are submitting
a test message, you may need to run your daemon in foreground
mode.

http://exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html#SECID39



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to