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 have a mail server X which acts as a middle man between the customers (A) of our feedback applet, created to be used in their websites, and customers (B) of our customers.

So, whenever B sends an email to A, it goes via X, where we decorate the same so as to give it a specific look. We have a specific method of forwarding the same, wherein we attach an ID to each message going through the server.

Problem: Infinite loops are being created if both A and C have automatic responses on.

How can the same be prevented?

Solutions thought of so far:

  1. Maintain a dictionary of plausible words that can be used in "Away" methods.

    Problem: Not exhaustive.

  2. Not allowing more than 'X' messages between 2 parties in one day.

    Problem: Limits legitimate usage.

share|improve this question

migrated from superuser.com Jan 3 '13 at 19:47

This question came from our site for computer enthusiasts and power users.

    
en.wikipedia.org/wiki/Email_loop#Prevention –  Bob Jan 3 '13 at 15:11
    
Which mail server are you using? Any solution would be implementation-specific to the functionality of the mail server and the operating system. –  allquixotic Jan 3 '13 at 15:13
1  
I like this question... would be a great candidate for ServerFault –  Bigbio2002 Jan 3 '13 at 15:13
    
Could you change the auto respond emails to come from noreply@[yourdomain.com]? –  Tanner Jan 3 '13 at 15:25

3 Answers 3

Not allowing more than 'X' messages between 2 parties in one day.

Almost right, now consider how fast automatic responses happen as opposed to legitimate messages; if you implement a flood limit, you will allow typical messages while not allowing rapid flooding because of automatic responses.

So, set up "X messages per Y minutes" or something along those lines.

share|improve this answer

More information would be great, but in the absence of that I will assume you can do whatever you please. I'm also going to assume that these auto-replies quote the message they respond to.

As such, assuming your volume and computing power allow this, why not look for repeated responses in the ABAB pattern? That is, if you see the following, bounce it back with a kind message saying that the similarity of responses is like that generated by automatic responses:

From: Adam
Sent: Wednesday, January 03, 2013 9:10 AM
To: Box Co
Subject: RE: That thing

I'm on vacation and will get back to you on January 10.
-Adam

From: Box Co
Sent: Wednesday, January 03, 2013 9:11 AM
To: Adam
Subject: RE: That Thing

We are closed in order to observe the Tamaseseri Festival and will return tomorrow.
Box Co
Where the boxes are best!

From: Adam 
Sent: Wednesday, January 03, 2013 9:10 AM
To: Box Co
Subject: RE: That thing

I'm on vacation and will get back to you on January 10.
-Adam

From: Box Co
Sent: Wednesday, January 03, 2013 9:08 AM
To: Adam
Subject: RE: That Thing

We are closed in order to observe the Tamaseseri Festival and will return tomorrow.
Box Co
Where the boxes are best!

From: Adam 
Sent: Wednesday, January 03, 2013 9:07 AM
To: Box Co
Subject: That thing

Do you have that thing I put in the box?
-Adam

Do something along the lines of /\nSubject.*\n([.\n]*?)\nFrom/ to find what each party sent to each other and compare for sameness in the ABAB pattern. You'll have to remove the effects of auto-indenting etc.

This is not a simple solution, but I believe that it could be made to work and should minimize false positives and false negatives.

share|improve this answer

in addition to the "limit x amount of messages in y amount of time per address" there are a few indicators that a message is automatically generated and should therefore probably not be forwarded.

check for example the following headers (and SET THEM in your mail forwarder as well, so well behaving out-of-office implementations don't even reply to your application)

precedence: bulk/list/junk
x-precedence: bulk/list/junk
auto-submitted: auto-replied
X-Auto-Response-Suppress: ALL/DR/NDR/RN/NRN/OOF/AutoReply
x-autoresponse

also, some out-of-office implementations do not use the user email as envelope sender but something like postmaster@ or the null sender.

I listed a few more indicators in this stackoverflow question but I'm not sure they apply in your case.

share|improve this answer

Your Answer

 
discard

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