On Sun, 7 Feb 1999, Timothy Ayodele wrote:
> Hi,
>       Can anyone point me to or give me a hint on how to use the deny file to
> block junk mail? I tried entering the domain into the deny file and I get a
> hash error.
> Thanks

The format of the /etc/mail/deny file is:
        cyberamish.com          "571 Known spammer: mail rejected."
        205.254.165             "571 your IP range appears to spam"
        answerme.com   "571 wewontansweryou: known spammer fakedomain"
        [EMAIL PROTECTED]       "571 bite us"
        [EMAIL PROTECTED] "571 leave us alone"
Where the first field is the domain (or complete email address) you want
to reject, and the second field contains the error code you want to
return (usually 571 denoting a permant error,) and a plain text message
that will be returned to the sender, place it all within quotes as
shown. After this you must hash the database. I wrote a short shell
script that will first sort /etc/mail/deny alphabetically, then hash the
database so sendmail can read it. Here's the script:
        sort /etc/mail/deny > /etc/mail/temp
        cp -f /etc/mail/temp /etc/mail/deny
        makemap -v hash /etc/mail/deny < /etc/mail/deny
Place it into /etc/mail/, name it updatedeny (or whatever you fancy,)
make it executable, then run it each time you edit /etc/mail/deny. It
will create a file named /etc/mail/deny.db that sendmail will use to vet
mail as it arrives.
Later,
Russ.
-- 
        For a copy of my mailbot's index, send an empty email to:
                         [EMAIL PROTECTED]
(Last updated 10 Aug 1998: Privacy, web proxy & encrypting identd responses)
    Support good government: http://www.lp.org & http://www.self-gov.org

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to