smtpRules-default.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  4. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  5. -->
  6. <!--
  7. 211 - A system status message.
  8. 214 - A help message for a human reader follows.
  9. 220 - SMTP Service ready.
  10. 221 - Service closing.
  11. 250 - Requested action taken and completed. The best message of them all.
  12. 251 - The recipient is not local to the server, but the server will accept and forward the message.
  13. 252 - The recipient cannot be VRFYed, but the server accepts the message and attempts delivery.
  14. 354 - Start message input and end with <CRLF>.<CRLF>. This indicates that the server is ready to accept the message itself (after you have told it who it is from and where you want to to go).
  15. 421 - The service is not available and the connection will be closed.
  16. 450 - The requested command failed because the user's mailbox was unavailable (for example because it was locked).
  17. Try again later.
  18. 451 - The command has been aborted due to a server error. Not your fault. Maybe let the admin know.
  19. 452 - The command has been aborted because the server has insufficient system storage.
  20. The following error messages (500-504) usually tell you that your email client is broken. It's probably best to let the program's author know.
  21. 500 - The server could not recognize the command due to a syntax error.
  22. 501 - A syntax error was encountered in command arguments.
  23. 502 - This command is not implemented.
  24. 503 - The server has encountered a bad sequence of commands.
  25. 504 - A command parameter is not implemented.
  26. 550 - The requested command failed because the user's mailbox was unavailable (for example because it was not found, or because the command was rejected for policy reasons).
  27. 551 - The recipient is not local to the server. The server then gives a forward address to try.
  28. 552 - The action was aborted due to exceeded storage allocation.
  29. 553 - The command was aborted because the mailbox name is invalid.
  30. 554 - The transaction failed. Blame it on the weather.
  31. -->
  32. <!--in order to make changes to the rules used by the nc mail server you will have to set the advanced property 'smtp.rules.properties.location' to point
  33. to a file on your server or a classloader resource path and include the file in the classes dir (or a jar in webapps lib). while developing new rules it may be usefull to
  34. set the smtp.rules.properties.reread advanced property to true so that the rules file is reread for every request. be sure to unset this after you are happy with the changes.-->
  35. <smtpRules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=".\smtpRules.xsd">
  36. <!--transport issues... server or authorisation try again indefinately until its fixed -->
  37. <smtpRule>
  38. <smtpError>
  39. <transport>true</transport>
  40. </smtpError>
  41. <smtpBehaviour name="transport">
  42. <keepMail>false</keepMail>
  43. <resends number="-1" delaySeconds="30"/>
  44. </smtpBehaviour>
  45. </smtpRule>
  46. <!--the mail is sent with one or more invalid recipients
  47. a fail mail with a variation on the original subject will be sent to the user performing the run-->
  48. <smtpRule>
  49. <smtpError>
  50. <invalidRecipients>true</invalidRecipients>
  51. </smtpError>
  52. <smtpBehaviour name="invalidRecips">
  53. <keepMail>false</keepMail>
  54. <failMail>
  55. <recipients sendToCurrentRecipients="false">
  56. <owner>true</owner>
  57. </recipients>
  58. </failMail>
  59. </smtpBehaviour>
  60. </smtpRule>
  61. <!--these next three rules cope with recipient errors where the email address is valid, but has been rejected by the server. The codes were harvested from the
  62. javamail source 551 is a code that is thrown when the argosoft mail server cannot find the address locally and does not relay-->
  63. <smtpRule>
  64. <smtpError>
  65. <errorCode>550</errorCode>
  66. </smtpError>
  67. <smtpBehaviourName>invalidRecips</smtpBehaviourName>
  68. </smtpRule>
  69. <smtpRule>
  70. <smtpError>
  71. <errorCode>553</errorCode>
  72. </smtpError>
  73. <smtpBehaviourName>invalidRecips</smtpBehaviourName>
  74. </smtpRule>
  75. <smtpRule>
  76. <smtpError>
  77. <errorCode>551</errorCode>
  78. </smtpError>
  79. <smtpBehaviourName>invalidRecips</smtpBehaviourName>
  80. </smtpRule>
  81. <!--the default behaviour is to attempt to resend 3 times with an hour delay the fail mail is the default which uses the original subject and recipients-->
  82. <defaultSmtpBehaviour>
  83. <smtpBehaviour name="default">
  84. <keepMail>false</keepMail>
  85. <resends number="1" delaySeconds="3600"/>
  86. <failMail/>
  87. </smtpBehaviour>
  88. </defaultSmtpBehaviour>
  89. <!--this sample shows how you can separate the behaviour from the rule
  90. this can be useful to re use behaviours-->
  91. <!--
  92. <smtpRule>
  93. <smtpError>
  94. <invalidRecipients>true</invalidRecipients>
  95. </smtpError>
  96. <smtpBehaviourName>invalidRecips</smtpBehaviourName>
  97. </smtpRule>-->
  98. <!--the error code here is an smtp return code. include a rule here when your mail server is producing
  99. unusual or specialized errors that you want to handle differently-->
  100. <!--<smtpRule>
  101. <smtpError>
  102. <errorCode>521</errorCode>
  103. </smtpError>
  104. <smtpBehaviour name="specialInvalidRecips">
  105. <keepMail>false</keepMail>
  106. <failMail>
  107. <subject>special error code 521</subject>
  108. </failMail>
  109. </smtpBehaviour>
  110. </smtpRule>-->
  111. <!--this sample shows how a fail mail can be sent to a specific recipient and with a hardcoded subject
  112. this example is in response to a special error code -->
  113. <!--<smtpRule>
  114. <smtpError>
  115. <errorCode>502</errorCode>
  116. </smtpError>
  117. <smtpBehaviour name="speciaErrorCode 502">
  118. <keepMail>false</keepMail>
  119. <failMail>
  120. <subject>special error code 502 - sent to a special recipient</subject>
  121. <recipients sendToCurrentRecipients="false">
  122. <recipient address="specialFailMailRecipient@cognos.com"/>
  123. </recipients>
  124. </failMail>
  125. </smtpBehaviour>
  126. </smtpRule>-->
  127. <!--if you decide to keep a mail from a particular error case, the mail will be left in the database queue. the queue name in the db table will include
  128. 'backup' in order to reactivate those messages, you will have to execute some sql to change the queue name to the original value and restart the server-->
  129. <!--<smtpRule>
  130. <smtpError>
  131. <errorCode>550</errorCode>
  132. </smtpError>
  133. <smtpBehaviour name="specialErrorCode-550">
  134. <keepMail>true</keepMail>
  135. <failMail>
  136. <subject>special error code 550 keep mail</subject>
  137. </failMail>
  138. </smtpBehaviour>
  139. </smtpRule>-->
  140. <!--this is a floating behaviour that can be referenced by name from the other rules-->
  141. <!--<smtpBehaviour name="invalidRecips">
  142. <keepMail>false</keepMail>
  143. <failMail>
  144. <recipients sendToCurrentRecipients="false">
  145. <owner>true</owner>
  146. </recipients>
  147. </failMail>
  148. </smtpBehaviour>-->
  149. </smtpRules>