[BlueOnyx:02924] Oops - mail mayhem!

Colin Jack colin at mainline.co.uk
Fri Nov 20 15:16:10 -05 2009


I sometimes have to email all users on my BX servers and so created a script called 'createforward.sh' with the following:

ls -Al /home/sites/*/users/*/mbox | gawk {'print "\\"$9'} | sed 's~/mbox~~' | sed 's~/home/sites/.*/~~' > ~allusers/.forward

This creates a .forward file for the user 'allusers' with an entry for each user.

 I then email allusers@<hostname> and it forwards a copy to all the users. I then delete the .forward file.

It works BUT sends out xxx copies to each user where xxx is the total number of users on the box (i.e. in the .forward file) which is a bit embarrassing!

Can anybody suggest a better way of doing this?

Thanks

Colin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20091120/e6f13140/attachment.html>


More information about the Blueonyx mailing list