From owner-freebsd-questions Wed Oct 18 8:14:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id 3624737B479 for ; Wed, 18 Oct 2000 08:14:42 -0700 (PDT) Received: from bagabeedaboo.security.at12.de (dial-195-14-235-72.netcologne.de [195.14.235.72]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id RAA02472; Wed, 18 Oct 2000 17:14:39 +0200 (MET DST) Received: from localhost (localhost.security.at12.de [127.0.0.1]) by bagabeedaboo.security.at12.de (8.11.1/8.11.0) with ESMTP id e9IFEVS05407; Wed, 18 Oct 2000 17:14:31 +0200 (CEST) (envelope-from pherman@frenchfries.net) Date: Wed, 18 Oct 2000 17:14:30 +0200 (CEST) From: Paul Herman To: Colin Jack Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Mailing Users In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 18 Oct 2000, Colin Jack wrote: > I am a relative newbie to freebsd, so please bear with me. > > Is there a way that I can send an email to all users on a server? > The idea is to warn everyone of downtime for maintenance, but with > a couple of hundred users .... there HAS to be an easy way :-) A lot of people told you how to write messages to those logged in, which might serve your needs, but if you definately would rather send a mail to all your users, you can make an alias in /etc/mail/aliases: all.users: :include:/var/log/user.list or whatever, and then just have a cronjob that updates this file every night or so which does something like: awk -F: '($3>999 && $3<65534) { print $1; }' /etc/passwd > /var/log/user.list -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message