Well as suggested by Rolf ages ago, I've kinda got it working via the policy tab instead.. but this then rules out any rules to be used which means it would generate extra CPU usage as my external program will be checking EVERY single email. If I have say 5 domains and only want to activate my email port-forwarding program on just a couple of addresses on one of those domains, I'm potentially scanning thousands of other emails for aboslutely no reason. Bonkers!
The policy tab isn't particularly helpful if i'm honest. To me it's a very basic "pass it to another program" feature.. but it's a feature that needs to be made available via a filter rule set so that it can be executed on demand instead of against everything.
I'll mull over whether I actually use this or not, it seems like a bad idea to me for the reaons stated above however given that Rolf and David do not seem at all interested in supporting the "Run a program" option and actually helping to make it work, I may well have no choice but to use this.
The documentation for the "Run a program" feature is terrible:
Running programs The Run Program rule action will start the specified program, passing a
temporary copy of the message on the commandline. Mercury will continue running after it
has run the program - it will not wait for the program to terminate. If you want to suspend
rule processing until the program has completed, you should create a second rule with the rule
action Wait until a file exists: when it encounters this rule, Mercury will wait a maximum of
two minutes for the filename you specify to appear on the system. When the file appears,
Mercury will delete it and continue. The intention here is that your program or batch file will
create a 0-length file as a semaphore to indicate that it has completed. Remember! Mercury
will delete the file before continuing – do not store any information you wish to keep in this
file.
Does this mention any parameters? No (not that there are any)
Does it mention stdin? No (not that it uses it)
Does it mention that it's completely broken and passes no email information via the commandline? Absolutely not!
I guess that you could pass a hard-coded parameter (eg save the email to a hard coded file name and then pass that in the "Run a program" action with the hard coded paramter) however if you're getting multiple emails at once all fighting for that one file name... you're stuffed. For the record, I tried all of the ~X, ~Y etc paramters mentioned in the policy instructions in the global rules but all that I saw posted as a parameter to my app was the path to the mercury folder. As a policy, these paramaters work well but in the global filters they are useless. Again, that's no use if i only want to run a program against emails that meet certain criteria.
That incomplete error logging that is being ignored is also not a good sign. I certainly could not justify purchasing a licence based on the glaringly obvious bugs in this software that go uncared about.
Well as suggested by Rolf ages ago, I've kinda got it working via the policy tab instead.. but this then rules out any rules to be used which means it would generate extra CPU usage as my external program will be checking EVERY single email. If I have say 5 domains and only want to activate my email port-forwarding program on just a couple of addresses on one of those domains, I'm potentially scanning thousands of other emails for aboslutely no reason. Bonkers!
The policy tab isn't particularly helpful if i'm honest. To me it's a very basic "pass it to another program" feature.. but it's a feature that needs to be made available via a filter rule set so that it can be executed on demand instead of against everything.
I'll mull over whether I actually use this or not, it seems like a bad idea to me for the reaons stated above however given that Rolf and David do not seem at all interested in supporting the "Run a program" option and actually helping to make it work, I may well have no choice but to use this.
The documentation for the "Run a program" feature is terrible:
> Running programs The Run Program rule action will start the specified program, **passing a
temporary copy of the message on the commandline.** Mercury will continue running after it
has run the program - it will not wait for the program to terminate. If you want to suspend
rule processing until the program has completed, you should create a second rule with the rule
action Wait until a file exists: when it encounters this rule, Mercury will wait a maximum of
two minutes for the filename you specify to appear on the system. When the file appears,
Mercury will delete it and continue. The intention here is that your program or batch file will
create a 0-length file as a semaphore to indicate that it has completed. Remember! Mercury
will delete the file before continuing – do not store any information you wish to keep in this
file.
Does this mention any parameters? No (not that there are any)
Does it mention stdin? No (not that it uses it)
Does it mention that it's completely broken and passes no email information via the commandline? Absolutely not!
I guess that you could pass a hard-coded parameter (eg save the email to a hard coded file name and then pass that in the "Run a program" action with the hard coded paramter) however if you're getting multiple emails at once all fighting for that one file name... you're stuffed. For the record, I tried all of the ~X, ~Y etc paramters mentioned in the policy instructions in the global rules but all that I saw posted as a parameter to my app was the path to the mercury folder. As a policy, these paramaters work well but in the global filters they are useless. Again, that's no use if i only want to run a program against emails that meet certain criteria.
That incomplete error logging that is being ignored is also not a good sign. I certainly could not justify purchasing a licence based on the glaringly obvious bugs in this software that go uncared about.