airblaine has asked for the wisdom of the Perl Monks concerning the following question:

I need to forward email from one "customer_service@sdfsd.com" account to several sales people sequentially or in a round robin way. Using qmail (if that matters). Mail messages reside in one directory as seperate files, so it's a matter of "if a file shows up here, move it there" Which I can do, but I'm stuck on the the sequence part. Any ideas, oh great ones?
  • Comment on sequential email forwarding from one account

Replies are listed 'Best First'.
Re: sequential email forwarding from one account
by bassplayer (Monsignor) on May 29, 2002 at 20:13 UTC
    How about storing the users in a text file, one on each line? When a mail file shows up, read the text file, and store the users in an array. shift the first value from the array, and forward the email to that user. Then push that user to the end of the array, and overwrite the file with the new list of users (with the recently selected user now at the bottom of the list.)

    Probably not the most elegant solution, but the user list would be pretty easy to maintain.

    bassplayer