Closed mamiu closed 1 month ago
Have you tried setting the log level to trace
to see if any errors of warning messages show up in the logs?
These are the only three log entries I get in regards to this sieve script:
DATE | LEVEL | MESSAGE |
---|---|---|
Tue, 16 Jul 2024 10:56:22 | DEBUG | common::scripts::plugins::lookup: context="sieve:key_get" event="failed" reason="Unknown store or lookup id" lookup_id="storage" |
Tue, 16 Jul 2024 10:56:22 | DEBUG | common::scripts::plugins::lookup: context="sieve:key_get" event="failed" reason="Unknown store or lookup id" lookup_id="lookup" |
Tue, 16 Jul 2024 10:56:22 | WARN | common::scripts::plugins::lookup: context="sieve:is_local_domain" event="failed" reason="Unknown directory" lookup_id="default" |
This looks like a database error that is not being properly reported. I'm currently working on improving the logging mechanism. Once the new version is released (hopefully by the end of next week) we'll test this again.
Great, thanks. Looking forward to it!
What happened?
I'm trying to check if the recipients domain is a local domain in a sieve script (attached to
session.data.script
).And I don't want to manually keep the script in sync with local domains like so:
The
is_local_domain()
function can do just that and in combination with theeval
keyword I thought it should be possible. But no matter what I do, the is_local_domain function doesn't work in sieve scripts (in normal config expressions it does work as expected). BTW: I have one directory with the ID 'internal', of type Internal, and rocksdb as storage backend (the default configuration).Here are a few things I tried (content of
if
conditions omitted for brevity):How can we reproduce the problem?
I can reproduce the problem by doing the following steps:
Create a sieve script with the following content (replace
oneofmylocaldomains.com
with a domain on your server):Attach this script to the inbound SMTP pipeline (e.g. the DATA stage
session.data.script
)Send an email to any email address with your specified domain (e.g. test@oneofmylocaldomains.com)
Check the header fields of the email
Result:
Expected result:
At least one of the headers should show a
1
instead of0
.Version
v0.8.x
What database are you using?
RocksDB
What blob storage are you using?
RocksDB
Where is your directory located?
Internal
What operating system are you using?
Docker
Relevant log output
No response
Code of Conduct