We have a complicated situation where we want to check if receivers of incoming E-Mails have a certain character in the address, and if yes, replace it with another character.
So far we made a custom What Object, that solves the first part of the problem: it detects the certain symbol in the field "To" with a regex. Next step we tried to solve over a custom Action Object - Header Attribute, but will not work, because it does not allow us to replace a character in the field, but only to add a whole field.
So everything packed together:
Let's say an E-Mail comes for `string&string@example.com`. We want to:
1. Detect all '&'s. Done by custom What Object with example regex `.*\&.*`.
2. Replace `To` Header with `string#string@example.com`, via any means possible.
Do you have any experience with such use cases? How could we achieve this? We can also use bash, perl, php, python, ruby, java, C if needed, or anything else really. Important is just that the solution is also maintainable, for example easy to do again after updates.
Also completely other type of suggestions are welcome, such as using the underlying Postfix for this or even implementing another Relay in the middle. Our current Mail Server can not handle this.
So far we made a custom What Object, that solves the first part of the problem: it detects the certain symbol in the field "To" with a regex. Next step we tried to solve over a custom Action Object - Header Attribute, but will not work, because it does not allow us to replace a character in the field, but only to add a whole field.
So everything packed together:
Let's say an E-Mail comes for `string&string@example.com`. We want to:
1. Detect all '&'s. Done by custom What Object with example regex `.*\&.*`.
2. Replace `To` Header with `string#string@example.com`, via any means possible.
Do you have any experience with such use cases? How could we achieve this? We can also use bash, perl, php, python, ruby, java, C if needed, or anything else really. Important is just that the solution is also maintainable, for example easy to do again after updates.
Also completely other type of suggestions are welcome, such as using the underlying Postfix for this or even implementing another Relay in the middle. Our current Mail Server can not handle this.