Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Preventing Mail Loops when Re-enqueuing Mail

This section shows how to add a new rewrite rule to prevent a message loop from happening if the program is doing intermediate processing that leaves the envelope recipient addresses unchanged. Otherwise, the channel would just enqueue the mail back to itself.

For discussion purposes, suppose that the channel is to provide intermediate processing for mail addressed to Further, the imta.cnf file has the following rewrite rule for $

For example, as shown in the code example that follows, assume that the intermediate processing channel’s name is “xloop_test.” Near the bottom of the imta.cnf file with other channel definitions, you would see the following definition:


Then, as shown in the following example, a new rewrite rule for needs to be added to the top of the imta.cnf file: $$Nxloop_test $

The new rewrite rule causes the following to happen: