Sendmail puzzle - Round Robin Delivery

I have a client that takes email orders for his services.  He wants one email addy setup for all orders, but wants the orders from that addy forwarded to a group of order entry people round robin style.  The idea is if he has 10 order entry people, and he get 1000 orders per day, that each person would get a balanced number of orders to enter.  Is there a script or an
entry I can use (maybe utilizing procmailrc) that will accomplish this?
astringAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PsiCopCommented:
No way to do this in a stock sendmail environment. Each address resolution occurs independent of the ones before or after.

I imagine you could do this with ProcMail running on the machine where local delivery is happening, using a system-wide ProcMail script. I haven't the faintest idea how you'd code it - seems to me you need some sort of persistent information store to track who got the last one and who should get the next one.

I think it'd be easier to do something like this in the framework provided by MIMEDefang (http://www.mimedefang.org). Using MIMEDefang, you can examine and alter virtually any aspect of an E-Mail. Since it's implemented in Perl, you can make use of Perl's file IO and database interfaces to create the persistent data store. As a bonus, MIMEDefang offers some excellent anti-SPAM capabilities.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
anfiCommented:
Have I understood that all oders will be send be customers to one "externally visible" email address?

YES=>
You can create OS account,  use ~/.procmailrc to deliver "round robin forwarding".

It would require using "per recipe" locking in procmail script and simple (perl?) script for keeping "in file round robin counter" and selecting recipient address from the list based on the counter value.
[ 10-20 lines of perl, 30 minutes  to gamma version]

Such design should be sufficient for handling on average 1 order every ~30s per 8h working day.
PsiCopCommented:
OK, anfi has given you a method to do it with ProcMail.

I'll note that MIMEDefang offers a great deal more capability, including the ability to rewrite headers (or even content) for OUTbound messages, so that even when  the salespeople screw up their mail reader/composer configuration, the "Reply-to" and other headers will indicate a standard reply address. This might be helpful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.