Diana Kirk wrote:
> On Friday 12 September 2003 01:44 pm, Daniel Liston wrote:
>
> How do you add addresses to the /etc/mail/access table? I'm assuming the
> addresses you add there are the ones you don't want to have access.
>
> I would like to block some addresses from my personal mailbox. My ISP
> offers a way of doing it by IP address, but that can be too broad. In a
> few cases, it's just a single address from a particular IP that I want
> to block.
The /etc/mail/access table is a system wide setting to sendmail, so if
you add anything for yourself, it will affect all the other users too.
The sendmail README.cf file covers the access mapping table in detail
under the "ANTI-SPAM CONFIGURATION CONTROL" section.
Blocking addresses from your personal mailbox, assuming you have shell
access to you unix home directory at your ISP, is better done from a
mail pre-processor tool like procmail. If your ISP uses procmail as
the Local Delivery Agent, configuration for personal settings will be
pretty easy. All you have to do is create a .procmailrc file in your
$HOME directory with recipes for what to check and how to handle them
when they match. For example, to simply delete all mail from an address
claiming to be friend@public.com, the recipe would look like this;
#delete spam from fake address
:0
* ^From: .*friend@public\.com
/dev/null
Some examples of filing, forwarding, or piping to another tool for
additional processing;
#file all email from fake domains
:0
* ^Received: .*may be forged
$HOME/mail/forged
#forward spamtrap mail to spamarchive
:0
* !^TO_me@my\.domain\.com
! submitautomated@spamarchive.org
#pipe ALL messages to spamassassin
:0 fw
| /usr/local/bin/spamc -f
:0e
{
EXITCODE=$?
}
Dan Liston
Follow-Ups:
References:
|
|