[BlueOnyx:02930] Re: Oops - mail mayhem!
Colin Jack
colin at mainline.co.uk
Fri Nov 20 17:31:20 -05 2009
Schoolboy error - just realised that my script also includes 'allusers' in it's .forward - oops!
Colin
On 20/11/2009 20:16, "Colin Jack" <colin at mainline.co.uk> wrote:
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/ff3b4628/attachment.html>
More information about the Blueonyx
mailing list