On Mon, Mar 15, 1999 at 02:02:12PM -0800, Kai MacTane wrote:
> >so for each message to [EMAIL PROTECTED], it is delivered to those three
> >people, what i would like to do is have every other message goto
> >every other person, so msg1 goes to tech1, msg2 goes to tech2, msg3 goes
> >to tech3, msg4 goes to tech1, and so on...
>
> My quickie solution would be something like this (untested code follows!):
>
> .qmail-support:
> &[EMAIL PROTECTED]
> |/usr/local/bin/rotate
>
> /usr/local/bin/rotate:
> tail +2 name-list > name-list.tmp
> head -1 name-list >> name-list.tmp
> mv -f name-list.tmp name-list
> head -1 name-list > /var/qmail/alias/.qmail-support
> echo "|/usr/local/bin/rotate" >> /var/qmail/alias/.qmail-support
Make sure you make the ~alias directory sticky, because mail can arrive
anytime. Also, this method has a problem because 2 qmail-locals will run 2
rotates and may cause corruption of the name list. It is better to use a
locking mechanism. A perfect tool is the setlock command from the
serialmail package.
--
System Administrator
See complete headers for address, homepage and phone numbers