AW: [Mimedefang] Detect mail loops in mimedefang ?

Florian Meister Florian.Meister at medienhaus.at
Thu Jul 28 09:54:00 EDT 2005


Imagine the following:

2 mail relays and one mail-storage. The mail-storage has a webinterface on which you can redirect your mail. You redirect the mail to a mailbox which does not exist, and because of the redirect the Return-Path points to the redirected mailbox. The Server to which is redirected sends a bounce-mail. The bounce-mail comes in to the mail-relays. The mail relays do not see that the mail is rotating, because of the forwarding. Then the mail is forwarded and bounced again and gets bigger and bigger.

Below is a part of this bounced mail. Ist about 500kb, text only bounce messages.

Cu, florian

--snip--
This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58ECB9B35F6BC0000DE55mc3?f39.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       mirko6636 at hotmail.com




--9B095B5ADSN=_01C58ECB9B35F6BC0000DE55mc3?f39.hotmail.
Content-Type: message/delivery-status

Reporting-MTA: dns;mc3-f39.hotmail.com
Received-From-MTA: dns;stalker1.tele.net
Arrival-Date: Sat, 23 Jul 2005 11:09:01 -0700

Final-Recipient: rfc822;mirko6636 at hotmail.com
Action: failed
Status: 5.2.2
Diagnostic-Code: smtp;552 5.2.2 This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.

--9B095B5ADSN=_01C58ECB9B35F6BC0000DE55mc3?f39.hotmail.
Content-Type: message/rfc822

Received: from stalker1.tele.net ([194.183.128.169]) by mc3-f39.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Sat, 23 Jul 2005 11:09:01 -0700
Received: from <psych at mail.austria.com>
  by stalker1.tele.net (CommuniGate Pro RULES 4.1.8)
  with RULES id 223564663; Sat, 23 Jul 2005 20:08:53 +0200
X-Autogenerated: Redirect
Sender: <psych at mail.austria.com> (bernd strohmaier)
To: mirko6636 at hotmail.com
Date: Sat, 23 Jul 2005 20:08:53 +0200
Message-ID: <redirect-223564663 at stalker1.tele.net>
X-Original-Return-Path: <>
Received: from tpsmtpu01.tele.net ([194.183.128.153] verified)
  by stalker1.tele.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 223564658 for psych at mail.austria.com; Sat, 23 Jul 2005 20:08:52 +0200
Received: from spooler.tele.net (spooler.TELE.NET [194.183.128.164])
	by tpsmtpu01.tele.net (8.12.10/8.12.6) with ESMTP id j6NHtAiP026247
	for <psych at mail.austria.com>; Sat, 23 Jul 2005 20:08:52 +0200 (CEST)
Received: from omc1-s6.bay6.hotmail.com (omc1-s6.bay6.hotmail.com [65.54.248.208])
	by spooler.tele.net (8.13.3/8.13.1) with ESMTP id j6NAAoL9093657
	for <psych at mail.austria.com>; Sat, 23 Jul 2005 12:11:05 +0200 (CEST)
Received: from mc1-f14.hotmail.com ([64.4.50.21]) by omc1-s6.bay6.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Sat, 23 Jul 2005 03:10:05 -0700
From: postmaster at hotmail.com
X-Original-To: psych at mail.austria.com
X-Original-Date: Sat, 23 Jul 2005 03:10:05 -0700
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
	boundary="9B095B5ADSN=_01C58EB745BB76800000D236mc1?f14.hotmail."
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
X-Original-Message-ID: <UGtLcw9hA0000b24e at mc1-f14.hotmail.com>
Subject: Delivery Status Notification (Failure)
X-OriginalArrivalTime: 23 Jul 2005 10:10:05.0846 (UTC) FILETIME=[B2C69360:01C58F6E]
Return-Path: psych at mail.austria.com

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58EB745BB76800000D236mc1?f14.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       mirko6636 at hotmail.com




--9B095B5ADSN=_01C58EB745BB76800000D236mc1?f14.hotmail.
Content-Type: message/delivery-status

Reporting-MTA: dns;mc1-f14.hotmail.com
Received-From-MTA: dns;stalker1.tele.net
Arrival-Date: Sat, 23 Jul 2005 03:09:56 -0700

Final-Recipient: rfc822;mirko6636 at hotmail.com
Action: failed
Status: 5.2.2
Diagnostic-Code: smtp;552 5.2.2 This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.

--9B095B5ADSN=_01C58EB745BB76800000D236mc1?f14.hotmail.
Content-Type: message/rfc822

Received: from stalker1.tele.net ([194.183.128.169]) by mc1-f14.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Sat, 23 Jul 2005 03:09:56 -0700
Received: from <psych at mail.austria.com>
  by stalker1.tele.net (CommuniGate Pro RULES 4.1.8)
  with RULES id 223464772; Sat, 23 Jul 2005 12:06:05 +0200
X-Autogenerated: Redirect
Sender: <psych at mail.austria.com> (bernd strohmaier)
To: mirko6636 at hotmail.com
Date: Sat, 23 Jul 2005 12:06:05 +0200
Message-ID: <redirect-223464772 at stalker1.tele.net>
X-Original-Return-Path: <>
Received: from tpsmtpu01.tele.net ([194.183.128.153] verified)
  by stalker1.tele.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 223464767 for psych at mail.austria.com; Sat, 23 Jul 2005 12:06:05 +0200
Received: from spooler.tele.net (spooler.TELE.NET [194.183.128.164])
	by tpsmtpu01.tele.net (8.12.10/8.12.6) with ESMTP id j6N9XxiT029613
	for <psych at mail.austria.com>; Sat, 23 Jul 2005 12:06:04 +0200 (CEST)
Received: from omc1-s7.bay6.hotmail.com (omc1-s7.bay6.hotmail.com [65.54.248.209])
	by spooler.tele.net (8.13.3/8.13.1) with ESMTP id j6N6790E024233
	for <psych at mail.austria.com>; Sat, 23 Jul 2005 08:07:17 +0200 (CEST)
Received: from mc1-f35.hotmail.com ([64.4.50.42]) by omc1-s7.bay6.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 23:05:14 -0700
From: postmaster at hotmail.com
X-Original-To: psych at mail.austria.com
X-Original-Date: Fri, 22 Jul 2005 23:05:14 -0700
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
	boundary="9B095B5ADSN=_01C58EB9C5621C840000AC1Fmc1?f35.hotmail."
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
X-Original-Message-ID: <4y2rijpkw00009876 at mc1-f35.hotmail.com>
Subject: Delivery Status Notification (Failure)
X-OriginalArrivalTime: 23 Jul 2005 06:05:14.0702 (UTC) FILETIME=[7E2BE6E0:01C58F4C]
Return-Path: psych at mail.austria.com

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58EB9C5621C840000AC1Fmc1?f35.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       mirko6636 at hotmail.com




--9B095B5ADSN=_01C58EB9C5621C840000AC1Fmc1?f35.hotmail.
Content-Type: message/delivery-status

Reporting-MTA: dns;mc1-f35.hotmail.com
Received-From-MTA: dns;stalker1.tele.net
Arrival-Date: Fri, 22 Jul 2005 23:05:07 -0700

Final-Recipient: rfc822;mirko6636 at hotmail.com
Action: failed
Status: 5.2.2
Diagnostic-Code: smtp;552 5.2.2 This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.

--9B095B5ADSN=_01C58EB9C5621C840000AC1Fmc1?f35.hotmail.
Content-Type: message/rfc822

Received: from stalker1.tele.net ([194.183.128.169]) by mc1-f35.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 23:05:07 -0700
Received: from <psych at mail.austria.com>
  by stalker1.tele.net (CommuniGate Pro RULES 4.1.8)
  with RULES id 223411044; Sat, 23 Jul 2005 08:02:37 +0200
X-Autogenerated: Redirect
Sender: <psych at mail.austria.com> (bernd strohmaier)
To: mirko6636 at hotmail.com
Date: Sat, 23 Jul 2005 08:02:37 +0200
Message-ID: <redirect-223411044 at stalker1.tele.net>
X-Original-Return-Path: <>
Received: from tpsmtpu02.tele.net ([194.183.128.154] verified)
  by stalker1.tele.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 223411006 for psych at mail.austria.com; Sat, 23 Jul 2005 08:02:36 +0200
Received: from spooler.tele.net (spooler.TELE.NET [194.183.128.164])
	by tpsmtpu02.tele.net (8.12.10/8.12.6) with ESMTP id j6N5j0NC049309
	for <psych at mail.austria.com>; Sat, 23 Jul 2005 08:02:36 +0200 (CEST)
Received: from omc1-s40.bay6.hotmail.com (omc1-s40.bay6.hotmail.com [65.54.248.242])
	by spooler.tele.net (8.13.3/8.13.1) with ESMTP id j6MKlsv2058199
	for <psych at mail.austria.com>; Fri, 22 Jul 2005 22:48:02 +0200 (CEST)
Received: from mc4-f21.hotmail.com ([65.54.190.157]) by omc1-s40.bay6.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 13:46:23 -0700
From: postmaster at hotmail.com
X-Original-To: psych at mail.austria.com
X-Original-Date: Fri, 22 Jul 2005 13:46:26 -0700
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
	boundary="9B095B5ADSN=_01C58ED138285FAA00003AD6mc4?f21.hotmail."
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
X-Original-Message-ID: <jLQoOuDdH00003487 at mc4-f21.hotmail.com>
Subject: Delivery Status Notification (Failure)
X-OriginalArrivalTime: 22 Jul 2005 20:46:23.0799 (UTC) FILETIME=[6C322470:01C58EFE]
Return-Path: psych at mail.austria.com

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58ED138285FAA00003AD6mc4?f21.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       mirko6636 at hotmail.com




--9B095B5ADSN=_01C58ED138285FAA00003AD6mc4?f21.hotmail.
Content-Type: message/delivery-status

Reporting-MTA: dns;mc4-f21.hotmail.com
Received-From-MTA: dns;stalker1.tele.net
Arrival-Date: Fri, 22 Jul 2005 13:46:16 -0700

Final-Recipient: rfc822;mirko6636 at hotmail.com
Action: failed
Status: 5.2.2
Diagnostic-Code: smtp;552 5.2.2 This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.

--9B095B5ADSN=_01C58ED138285FAA00003AD6mc4?f21.hotmail.
Content-Type: message/rfc822

Received: from stalker1.tele.net ([194.183.128.169]) by mc4-f21.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 13:46:16 -0700
Received: from <psych at mail.austria.com>
  by stalker1.tele.net (CommuniGate Pro RULES 4.1.8)
  with RULES id 223311588; Fri, 22 Jul 2005 22:43:11 +0200
X-Autogenerated: Redirect
Sender: <psych at mail.austria.com> (bernd strohmaier)
To: mirko6636 at hotmail.com
Date: Fri, 22 Jul 2005 22:43:11 +0200
Message-ID: <redirect-223311588 at stalker1.tele.net>
X-Original-Return-Path: <>
Received: from tpsmtpu01.tele.net ([194.183.128.153] verified)
  by stalker1.tele.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 223311586 for psych at mail.austria.com; Fri, 22 Jul 2005 22:43:10 +0200
Received: from omc1-s29.bay6.hotmail.com (omc1-s29.bay6.hotmail.com [65.54.248.231])
	by tpsmtpu01.tele.net (8.12.10/8.12.6) with ESMTP id j6MKfZgT060067
	for <psych at mail.austria.com>; Fri, 22 Jul 2005 22:41:37 +0200 (CEST)
Received: from mc4-f14.hotmail.com ([65.54.190.150]) by omc1-s29.bay6.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 13:41:35 -0700
From: postmaster at hotmail.com
X-Original-To: psych at mail.austria.com
X-Original-Date: Fri, 22 Jul 2005 13:41:34 -0700
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
	boundary="9B095B5ADSN=_01C58ED0754E704600003C01mc4?f14.hotmail."
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
X-Original-Message-ID: <VXGgaH8Nj000035b7 at mc4-f14.hotmail.com>
Subject: Delivery Status Notification (Failure)
X-OriginalArrivalTime: 22 Jul 2005 20:41:35.0368 (UTC) FILETIME=[C0471080:01C58EFD]
X-Virus-enabled: 1
X-Spam-enabled: 1
X-Spam-discard: 0
X-Virus-discard: 0
X-Special-Recipient: @@default@@
X-Recipients: <psych at mail.austria.com>
X-Virus-Flag: NO
X-Virus-Scanned: ClamAV / www.clamav.net
X-Scanned-By: MIMEDefang 2.51 on 194.183.128.153
Return-Path: psych at mail.austria.com

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58ED0754E704600003C01mc4?f14.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       mirko6636 at hotmail.com




--9B095B5ADSN=_01C58ED0754E704600003C01mc4?f14.hotmail.
Content-Type: message/delivery-status

Reporting-MTA: dns;mc4-f14.hotmail.com
Received-From-MTA: dns;stalker1.tele.net
Arrival-Date: Fri, 22 Jul 2005 13:41:25 -0700

Final-Recipient: rfc822;mirko6636 at hotmail.com
Action: failed
Status: 5.2.2
Diagnostic-Code: smtp;552 5.2.2 This message is larger than the current system limit or the recipient's mailbox is full. Create a shorter message body or remove attachments and try sending it again.

--9B095B5ADSN=_01C58ED0754E704600003C01mc4?f14.hotmail.
Content-Type: message/rfc822

Received: from stalker1.tele.net ([194.183.128.169]) by mc4-f14.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 13:41:25 -0700
Received: from <psych at mail.austria.com>
  by stalker1.tele.net (CommuniGate Pro RULES 4.1.8)
  with RULES id 223309584; Fri, 22 Jul 2005 22:32:37 +0200
X-Autogenerated: Redirect
Sender: <psych at mail.austria.com> (bernd strohmaier)
To: mirko6636 at hotmail.com
Date: Fri, 22 Jul 2005 22:32:37 +0200
Message-ID: <redirect-223309584 at stalker1.tele.net>
X-Original-Return-Path: <>
Received: from tpsmtpu01.tele.net ([194.183.128.153] verified)
  by stalker1.tele.net (CommuniGate Pro SMTP 4.1.8)
  with ESMTP id 223309582 for psych at mail.austria.com; Fri, 22 Jul 2005 22:32:37 +0200
Received: from omc1-s17.bay6.hotmail.com (omc1-s17.bay6.hotmail.com [65.54.248.219])
	by tpsmtpu01.tele.net (8.12.10/8.12.6) with ESMTP id j6MKRWgT054913
	for <psych at mail.austria.com>; Fri, 22 Jul 2005 22:27:33 +0200 (CEST)
Received: from MC6-F28.hotmail.com ([65.54.252.164]) by omc1-s17.bay6.hotmail.com with Microsoft SMTPSVC(6.0.3790.211);
	 Fri, 22 Jul 2005 13:27:31 -0700
From: postmaster at hotmail.com
X-Original-To: psych at mail.austria.com
X-Original-Date: Fri, 22 Jul 2005 13:27:26 -0700
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
	boundary="9B095B5ADSN=_01C58EE35FB0B02400002A9EMC6?F28.hotmail."
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
X-Original-Message-ID: <0E6faZWZa000025b9 at MC6-F28.hotmail.com>
Subject: Delivery Status Notification (Failure)
X-OriginalArrivalTime: 22 Jul 2005 20:27:31.0309 (UTC) FILETIME=[C92DE1D0:01C58EFB]
Return-Path: psych at mail.austria.com

This is a MIME-formatted message.  
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01C58EE35FB0B02400002A9EMC6?F28.hotmail.
Content-Type: text/plain; charset=unicode-1-1-utf-7
--snap-- 

-----Ursprüngliche Nachricht-----
Von: mimedefang-bounces at lists.roaringpenguin.com [mailto:mimedefang-bounces at lists.roaringpenguin.com] Im Auftrag von David F. Skoll
Gesendet: Donnerstag, 28. Juli 2005 14:48
An: mimedefang at lists.roaringpenguin.com
Betreff: Re: [Mimedefang] Detect mail loops in mimedefang ?

Florian Meister wrote:

> I had a mail-looping problem last week and now I want to implement 
> something to detect such loops and drop the looping mail if it's 
> looping more than x times.

Sendmail has that capability built-in; why do you need MIMEDefang to do it?

> First I wanted to check the Received: lines and count every line where 
> one of our mailrelays is in. If the count reaches a specific value 
> drop the mail. The Problem is, that the Received-lines are written new 
> if the message is bounced.

You can count the number of Received: lines in the ./HEADERS file.

Or you can have MIMEDefang add a magic header to all mail, and reject mail if one comes in with the magic header already present.

Regards,

David.
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list