Hi all,
i need to send a notify message in a message filter to a specific internal mailserver, when the internal envelope recipient mail address does not exist.
We have three different backend mail-server with their own LDAP Database sharing the same mail-domain and unfortunately no common address-book. So i thought we could check it on the ESA.
The message filter looks like this:
address_check: if (sender-group= "RELAYLIST") AND (rcpt-to == "(?i)@company.com$") {
if (mail-from-group == "HumanRessources") {
notify-copy ("$EnvelopeSender", "Error while delivering: $Subject","Postmaster@company.com","address_not_exists");
alt-mailhost ("10.10.10.10");
drop();
}
The condition is correct, the original mail is dropped and in the message tracking log i can see, that a new message with a different MID is generated and put into the external delivery queue.
I've tried to change the order of the actions, but still the same result.
Another test with combining message and content filter didn't work too.
address_check: if (sender-group= "RELAYLIST") AND (rcpt-to == "(?i)@company.com$") {
if (mail-from-group == "HumanRessources") {
insert-header("X-My-Check","hr.server");
}
Filter Name: no_address
Conditions:
header("X-My-Check") == "^hr.server$"
Actions:
strip-header("X-My-Check")
alt-mailhost ("10.10.10.10")
notify ("$EnvelopeSender", "Error while delivering: $Subject","Postmaster@company.com","address_not_exists")
drop()
Please, can anybody explain why the notify message will not be send to the given mail-server?
Thanks a lot in advance
Michael