2

I tried to search and find similar topics but I couldn't find anything that quite addresses my issue. Basically, I help administer a server for a student group, and most users forward their mail off to some other address via .procmailrc. This is all fine and good, but sometimes for whatever reason the server they are forwarding mail to rejects the mail. Sometimes this happens because their campus mail account expired, or sometimes their webmail account disappeared or was full.

Regardless of the reason, when this happens, the forwarded server sends the bounce back to our server and this is where the fun begins. The bounce gets sent back to their address at our server, and postfix decides to forward this bounce to the forwarding address. This quickly creates a loop that fills up the postfix queue/mail partition and kills our mail server.

We are using Debian Lenny and Postfix, everything up to date.

What can we do to avoid this situation? This seems like something we're doing badly wrong, because I would hope that the bounce would go back to the original sender, not to us.

Thanks for your help!

Edit: To be clear, the server gets overloaded by an infinite chain of bounce notifications, not one message bouncing around repeatedly.

adamo
  • 6,925
  • 3
  • 30
  • 58
Ibrahim
  • 394
  • 5
  • 12

1 Answers1

1

Add a custom header (e.g. X-Loop) to the global users' procmailrc and check for it when the mail comes back in

Philip Reynolds
  • 9,799
  • 1
  • 34
  • 33
  • Thanks, that sounds like a good solution. Could you elaborate on that a little though? Where do I check for it when it comes back in? – Ibrahim Sep 13 '10 at 05:51
  • Also, is it normal for the bounce to come back to our server rather than the sender? It seems like the sender is the one that should care about it. – Ibrahim Sep 13 '10 at 05:52
  • Actually, you know, I'm not sure that this would work. Would the custom header necessarily be included in the bounce notification from the final recipient server? – Ibrahim Sep 13 '10 at 19:25
  • Read about the Delivered-To: trick http://cr.yp.to/proto/mailloops.txt and implement similar with procmail – adamo Mar 07 '11 at 19:37