Date: Wed, 12 Apr 2006 19:18:01 -0400 (EDT) From: Chris Hill <chris@monochrome.org> To: Robin Becker <robin@reportlab.com> Cc: freebsd-questions@freebsd.org Subject: Re: exclude root's mail Message-ID: <20060412185913.E39688@tripel.monochrome.org> In-Reply-To: <443D17EB.500@chamonix.reportlab.co.uk> References: <443D17EB.500@chamonix.reportlab.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Apr 2006, Robin Becker wrote: > For some reason my FreeBSD 6.0 server's root account has started to receive > spam. Is there a simple way to restrict all mail for root to come from a > specified local domain eg 192.168.0.0/8? I'm a naive sendmail person so > please be gentle :) I ran into something similar recently. Since you son't say, I'll assume you're running sendmail (if not please disregard the following). What I had to do was create the file /etc/mail/virtusertable. The idea is to list users you _do_ want to accept mail for and exclude anything else, thus rejecting mail sent to randomstring@yourdomain.com. My virtusertable looks something like this (names changed): chris@mydomain.com chris abuse@mydomain.com chris @mydomain.com error:nouser No such user here With this setup, mail to users chris and abuse get sent to me. Mail to any other username gets rejected with "No such user here". [ I got the hint about that key last line from http://www.freebsddiary.org/virtualmail.php ] Once you have edited virtusertable, you must do a 'make' in the directory /etc/mail, then '/etc/rc.d/sendmail restart'. All as root, of course. Should be OK after that. HTH. -- Chris Hill chris@monochrome.org ** [ Busy Expunging <|> ]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060412185913.E39688>