09-24-2020 02:52 PM
Hi,
I have configured a message filter and tested using the WUI trace option. This produces the results i want to see, however when i attempt to replicate having mail that should be tagged sent through the ESA, nothing happens.
Any thoughts?
09-25-2020 06:04 AM - edited 09-25-2020 06:05 AM
Hi Ivan,
debugging message filters is a bit harder but for me adding multiple log entries has paid off.
So your filter would mainly then look like:
Test_v3:
if (mail-from == test@domain.com) {
log-entry(Test_v3-Line 1);
insert-header(X-Test","Test");
log-entry(Test_v3-Line 2);
add=heading("ExternalHeader");
log-entry(Test_v3-Line3);
}
After the filter should run check the mail log on CLI and grep for the line items above like
grep "Test_v3-Line3" mail_logs
Then you should see if the filter did run at all and/or where it dropped out.
I hope that helps
Marc
09-25-2020 08:48 AM
see below
09-25-2020 08:47 AM
Hi Marc,
I did a test with the following:
EXT_TAG_LOG1: if recv-listener == "InboundMail" {
log-entry("EXT_TAG_LOG");
insert-header("Subject", "[EXTERNAL EMAIL] $Subject");
log-entry("EXT_TAG_LOG");
}
I send a test email that should be tagged with [EXTERNAL MAIL]. The email comes in with no tag. I then look at the SMA message tracking and see a line:
25 Sep 2020 12:51:52 (GMT -03:30)25 Sep 2020 12:51:52 (GMT -03:30)25 Sep 2020 12:51:52 (GMT -03:30)
Message 353 Custom Log Entry: EXT_TAG_LOG |
Message 353 Custom Log Entry: EXT_TAG_LOG |
Message 353 matched per-recipient policy DEFAULT for inbound mail policies. |
I then connect to the CLI and ran grep "EXT_TAG_LOG" mail.logs and i get:
Fri Sep 25 12:39:47 2020 Info: MID 351 Custom Log Entry: EXT_TAG_LOG
Fri Sep 25 12:51:52 2020 Info: MID 353 Custom Log Entry: EXT_TAG_LOG
Fri Sep 25 12:51:52 2020 Info: MID 353 Custom Log Entry: EXT_TAG_LOG
I thought i would get more information, am i missing something to check? I find it strange how trace in the WUI will work and show the correct response.
Thoughts?
09-25-2020 12:14 PM
Happy to help you further, please sent me an email at marc.luescher@gmail.com and we go from there.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide