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 [EMAIL PROTECTED] My virtusertable looks something like this (names changed):

[EMAIL PROTECTED]    chris
[EMAIL PROTECTED]    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               [EMAIL PROTECTED]
**                     [ Busy Expunging <|> ]
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to