From owner-freebsd-questions@FreeBSD.ORG Mon Apr 14 07:59:21 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 509E937B401 for ; Mon, 14 Apr 2003 07:59:21 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62E0543F93 for ; Mon, 14 Apr 2003 07:59:19 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h3EEx7Yk036543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 14 Apr 2003 15:59:07 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h3EEx7KR036538 for questions@freebsd.org; Mon, 14 Apr 2003 15:59:07 +0100 (BST) (envelope-from matthew) Date: Mon, 14 Apr 2003 15:59:07 +0100 From: Matthew Seaman To: questions@freebsd.org Message-ID: <20030414145907.GA36130@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@freebsd.org References: <20030414091614.GA33194@happy-idiot-talk.infracaninophi> <200304141013.H3EADIOJ071574@asarian-host.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304141013.H3EADIOJ071574@asarian-host.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-32.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT version=2.53 X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) Subject: Re: mail to all users on a system (from root) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 14:59:21 -0000 On Mon, Apr 14, 2003 at 10:13:18AM +0000, Mark wrote: > ----- Original Message ----- > From: "Matthew Seaman" > To: "Mike Meyer" > Cc: > Sent: Monday, April 14, 2003 11:17 AM > Subject: Re: mail to all users on a system (from root) > > > ... set up an alias that includes that list in /etc/mail/aliases: > > everybody: :include: /etc/mail/everybody.list > > And what will you do if a spam hits that address? Then that spam multiplies > by an order of magnitude! Would it not be beautiful if you could say > something thing like, > > everybody: :include:root /etc/mail/everybody.list ? > > I mean, aliases that can only be invoked by a specific user. Come to think > of it, for all purposes and intent, "chmod 600 /etc/mail/everybody.list" (as > user that will use the alias) will probably yield the desired effect. Uh, buy the time that the mail system gets to read the alias file it's already running as the mailnull UID. If you're going to have a mail alias that expands to all users, then it doesn't really matter how you do it: it's still a risk that it could get spammed. The way you'ld protect against that is specific to the MTA you're using, but with sendmail you could use the access DB (/etc/mail/access) to prevent any external sender sending to the 'everybody' alias. From:local-domain.com OK To:everyone@local-domain.com REJECT [You might need FEATURE(`blacklist_recipients') in your `hostname`.mc file for that to work...] See the section "Finer control by using tags for the LHS of the access map" in /usr/share/sendmail/cf/README for details. If you want finer grained control that that, you'll have to start crafting up some custom 'Local_check_mail' rulesets, but that's definitely for advanced users only. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK