Goal: Parse incoming mail, insert relevant data into a database, delete message afterward. Non-related mail messages are passed through to mailing lists and move out to an exchange server.
Problem: I've set up a really simple script to see all that filtering rules are going to work and they don't (not quite).
Policy:
Name: Test
Type: Run and examine return code
Command line: C:\....\test.bat ~X
Action: Return Message if undeliverable
Test.bat:
@echo off
echo %1
pause
exit 0
Every time mail is sent Mercury kills it with the policy. However...
Command line: C:\.....\test.bat
test.bat: - Works as expected (mail passed through)
@echo off
pause
exit 0
test.bat: -Works as expected (mail killed)
@echo off
pause
exit 1
I've read a few examples, but haven't been able to figure out what I'm doing wrong, and I assume it is related to how I am using or passing the substitutions. Thoughts?
<p>Goal: Parse incoming mail, insert relevant data into a database, delete message afterward.&nbsp; Non-related mail messages are passed through to mailing lists and move out to an exchange server.</p>
<p>&nbsp;</p>
<p>Problem: I've set up a really simple script to see all that filtering rules are going to work and they don't (not quite).</p>
<p>&nbsp;</p>
<p>Policy:
</p>
<p>Name: Test</p><p>Type: Run and examine return code</p><p>Command line: C:\....\test.bat ~X</p><p>Action: Return Message if undeliverable </p><p>&nbsp;</p><p>Test.bat:</p><p>@echo off</p><p>echo %1</p><p>pause</p><p>exit 0 </p><p>&nbsp;</p><p>Every time mail is sent Mercury kills it with the policy.&nbsp; However...</p><p>Command line: C:\.....\test.bat</p><p>test.bat: - Works as expected (mail passed through)
</p><p>@echo off</p><p>pause</p><p>exit 0 </p><p>test.bat: -Works as expected (mail killed)</p><p>@echo off</p><p>pause</p><p>exit 1 </p><p>&nbsp;</p><p>I've read a few examples, but haven't been able to figure out what I'm doing wrong, and I assume it is related to how I am using or passing the substitutions.&nbsp; Thoughts?&nbsp;&nbsp;
</p>