Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

Stopping Spam with Sendmail

Many people have problems with spam. The simplest way to avoid it is to never give out your e-mail address to anyone :( or build an access DB.

This will only work with people who use sendmail as their incoming mail server, not mail obtained over a POP3 connection (although this will work with clients such as fetchmail)

Here is a guide to setting up an access DB to stomp spam.

1.) Create the database file.

I suggest creating the file /etc/mail/access or editing this file if it is already there.

2.) Block hosts, address or domains

In this file you need to place the following to

a) domains  DENY

b) Hosts  DENY

c) Email address's  DENY

An example access file may look like this:-       DENY      DENY   DENY   DENY    DENY    DENY

The next step is to tell sendmail to rebuild the access database. The command for this is, as root,

makemap hash access < /etc/mail/access

This will rebuild the access database.
Address's matching this rules will get a message back similar to:

550 - Access Denied...

You have now learned one method of eradicating

-- Sparc

© 1997 - 20013 Defcon1, , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of and the content's original author.

Tool-Bar-2Defcon1  Webmail