cancel
Showing results for 
Search instead for 
Did you mean: 

Filter email using sendmail

khairul anuar md ali
Occasional Visitor

Filter email using sendmail

Firstly ,i have used access.db to block the email in sendmail. it is working fine. But the sendmail only block the user from sending email not blocking to the email listed. Here is the detail.
#cat access
raunaz@gmail.com REJECT

#telnet localhost 25
~
mail from: raunaz@gmail.com
550 5.7.1 raunaz@gmail.com... Access denied
mail from : test@gmail.com
250 2.1.0 test@gmail.com... Sender ok
rcpt to : raunaz@gmail.com
250 2.1.5 raunaz@gmail.com... Recipient ok
rcpt to :test1@gmail.com
250 2.1.5 test@gmail.com... Recipient ok

I'm only unable to send from the email. But,
I'm still able to send to the email. Please help if i miss anything.
thanks
5 REPLIES
Steven Schweda
Honored Contributor

Re: Filter email using sendmail

> [...] sendmail

Sendmail version? HP-UX version?

I'm not a serious sendmail user, so I know
nothing, but as I read:

http://www.sendmail.org/m4/anti_spam.html

I see:

[...]
An ``access'' database can be created to
accept or reject mail from selected domains.
[...]

Note: "from".

> rcpt to : raunaz@gmail.com
> 250 2.1.5 raunaz@gmail.com... Recipient ok

I assume that you don't run gmail.com, so why
do you care if someone sends a message to an
address in that domain? Is there some actual
problem which you are trying to solve?
khairul anuar md ali
Occasional Visitor

Re: Filter email using sendmail

Steven,
basically what i want to do is same as this link.
http://www.sendmail.org/m4/anti_spam.html#access_db_fine

I have insert FEATURE(access_db,`hash -T -o /etc/mail/access')dnl in the sendmail.mc
and restart the sendmail. After i create my access file. i compile using makemap command.
My access file lokes like this.
To:raunaz@gmail.com REJECT

Please help to verify what i'm missing.
Thanks
khairul anuar md ali
Occasional Visitor

Re: Filter email using sendmail

Hi all,
anyone have any idea about this?
Or i wrongly explain my question here..
Please help. thanks
VK2COT
Honored Contributor

Re: Filter email using sendmail

Hello,

a) What does this test show:

# sendmail -bt
> /map access raunaz@gmail.com

b) And this test:

# sendmail -bt

> check_rcpt raunaz@gmail.com

If they do not show rejection, than your
sendmail configuration or the access map
is not used properly.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
khairul anuar md ali
Occasional Visitor

Re: Filter email using sendmail

No, it didn't reject the email.