Go to the first, previous, next, last section, table of contents.

Testing an installed filter file

Testing a filter file before installation cannot find every potential problem; for example, it does not actually run commands to which messages are piped. Some `live' tests should therefore also be done once a filter is installed.

If at all possible, test your filter file by sending messages from some OTHER account. If you send a message to yourself from the filtered account, and delivery fails, the error message will be sent back to the same account, which may cause another delivery failure. It won't cause an infinite sequence of such messages, because delivery failure messages do not themselves generate further messages. However, it does mean that the failure won't be returned to you, and also that the postmaster will have to investigate the stuck message.

If you have to test a filter from the same account, then a sensible precaution is to include the line

if error_message then finish endif

as the first filter command, at least while testing. This causes filtering to be abandoned for a delivery failure message, and since no destinations are generated, the message goes on to get delivered to the original address. Unless there is a good reason for not doing so, it is recommended that the above test be left in all filter files.

Go to the first, previous, next, last section, table of contents.