Sendmail puzzle - Round Robin Delivery

Posted on 2006-04-13
Last Modified: 2013-12-17
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?
Question by:astring
    LVL 34

    Accepted Solution

    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 ( 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.
    LVL 6

    Expert Comment

    Have I understood that all oders will be send be customers to one "externally visible" email address?

    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.
    LVL 34

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Getting postfix to support IPv6 is a relatively simple matter (when you know how - or - have read this Article). First of all you must ensure that your server has IPv6 connectivity to the Internet. By default postfix will listen only on IPv4, …
    In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
    In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now