I have seen this problem several times in the last few weeks and figured it was worth a quick blog entry.
Here is what happens:
The reason this loop persist is each message receives a new Internet Message ID, thus it is considered a new message. With changes introduced in Exchange 2000 Post Service Pack 3 ( >= 6.0.6521) and in Exchange 2003 we set a maximum nested limit of 250 attachments. This limit can be adjust using a registry key entry outlined below. Eventually the nested depth of NDRs reaches 250 and Exchange begins NDR’ing the message due to Attachment limit being exceeded. At this point the message is ~3mb in size. This loop continues indefinitely as each NDR received by the Unix host is forwarded to the recipient which in turn is NDRed back to Unix.
For each message generated by this daemon running on Unix, a seperate looping message situation is created. So assuming over a 24 hour period 1 message is generated every 15 minutes, 96 messages are floating around the system each 3mb in size. By the end of the day 300mb of messages are continously trying to be processed. The eventually leds to the very poor performance from the server and growing STM files.
This problem can be prevented by aliasing/.forwarding the Unix contacts to a Distribution List on Exchange that is configured not to NDR messages. This way individuals can come and go from the DL and any delivery failures do not go back to the host.
To adjust the limits on number of attachments per message:
1. Start Registry Editor.
2. Locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\Parame
tersSystem\InternetContent
3. On the "Edit" menu, click "Add Value".
4. In the "Value Name" box, type "LimitBodyParts" (without the
quotation marks).
5. In the "Data Type" list, click "REG_DWORD", and then click "OK".
6. In the "DWORD Editor" dialog box, click "Decimal". In the "Data"
box, type the number of attachments that you want to set the limit to,
and then click "OK".
Note:
When LimitBodyParts is set to a value of less than 250 or not present, a default value of 250 is used. The value can be set as high as 4294967295 (0xFFFFFFFF).
To prevent the original message from being attached to a NDR, see the following article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;308303
[EDIT: 9/21/04 - Added Note regarding acceptable values of LimitBodyParts regkey]