Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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 5: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 5: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 cr.yp.to/proto/mailloops.txt and implement similar with procmail –  adamo Mar 7 '11 at 19:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.