Closed baimard closed 11 months ago
Mailcow does not support the syntax of enotify
nor does it have a module enotify
. It does provide notify
as a module instead (don't forget to import the module, that part appears to be missing from your code) and the syntax for the notify
command in that module can be found at https://github.com/mailcow/mailcow-dockerized/blob/master/data/web/inc/lib/sieve/extensions/notify.xml and it looks like:
notify [:method "method"] [:id "message-id"] [:(low|normal|high)] [:message "message"]
So an example would be:
require ["notify"]
notify :low :message "Some message!";
If I want to notify on an email on an other domain ?
Look that don't do the trick :(
If I want to notify on an email on an other domain ?
Look that don't do the trick :(
I believe you have to use the :method
parameter for that, which in the case of Mailcow actually requires the :method
part. I have not tested it, but I think it will look like this:
require ["notify"]
notify :low :message "Some message!" :method "mailto:example@example.com";
This syntax looks good :
require "notify";
notify :normal :message "test" :method "mailto:testd@test.world";
But dovecot logs :
Any idea ?
I found the RFC draft on which the Mailcow notify
is still based, see this. Based on that the syntax would be:
require "notify";
notify :normal :message "test" :method "mailto" :options "testd@test.world";
The problem here is that according to the spec within Mailcow, which I linked earlier, the :options
argument is not valid. So you will get a validation error when you try to use the example given above. There is no way around that without modifying part of Mailcow.
The Mailcow team can fix this by adding the :options
argument to the definition of notify
or actually upgrading the sieve modules and commands (then you would be able to use enotify
with the modern notify
syntax as defined in RFC 5435).
Personally, the latter option would be the best solution but seeing that almost all of the sieve modules have not been touched in 6 years (and notify
was deprecated in favour of enotify
at least 13 years ago) that is going to take some time.
I think the following modification would be required in the notify
definition:
<parameter type="tag" name="options" occurrence="optional" regex="options">
<parameter type="stringlist" name="option strings" />
</parameter>
However, I am currently unable to test this.
I'm gone test, thank you for your very good answer.
that work i'm gone do a pull request, thank you.
Finaly in data/web/inc/lib/sieve/extensions/notify.xml :
<?xml version='1.0' standalone='yes'?>
<extension name="notify">
<command name="notify">
<parameter type="tag" name="method" regex="method" occurrence="optional">
<parameter type="string" name="method-name" />
</parameter>
<parameter type="tag" name="id" regex="id" occurrence="optional">
<parameter type="string" name="message-id" />
</parameter>
<parameter type="tag" name="priority" regex="(low|normal|high)" occurrence="optional" />
<parameter type="tag" name="message" regex="message" occurrence="optional">
<parameter type="string" name="message-text" />
</parameter>
<parameter type="tag" name="options" regex="options" occurrence="optional">
<parameter type="stringlist" name="option-strings" />
</parameter>
</command>
<command name="denotify">
<parameter type="matchtype" occurrence="optional">
<parameter type="string" name="message-id" />
</parameter>
<parameter type="tag" name="priority" regex="(low|normal|high)" occurrence="optional" />
</command>
</extension>
for notification : go to filter in admin panel
require "notify";
notify :normal :message "test" :method "mailto" :options ["test@test.world"];
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Contribution guidelines
I've found a bug and checked that ...
Description
Logs:
Steps to reproduce:
test is not my real domain, please provide your
Logs of iptables -L -vn:
Logs of ip6tables -L -vn:
Logs of iptables -L -vn -t nat:
Logs of ip6tables -L -vn -t nat:
DNS check: