Operating System - Linux
1752685 Members
5322 Online
108789 Solutions
New Discussion юеВ

Re: Sendmail need to block incoming mails

 
Ganesan R
Honored Contributor

Sendmail need to block incoming mails

Hi Freinds,

I need to block incoming mail for a particular user where that user can send only outgoing mails. We are using sendmail 8.9.3 with PHNE_35950. The steps I performed are below.
1.Using /usr/newconfig/etc/mail/cf/cf/gen_cf script, created new sendmail.cf.gen file and copied to /etc/mail/sendmail.cf to enable
the blocklist recipients feature.

2. Then I create the /etc/mail/access file manually and put the below entry.
# more /etc/mail/access
test@abc.com REJECT

3.Then I created database map using the below command
#makemap dbm /etc/mail/access < /etc/mail/access

4.Restarted the sendmail daemon.

But still the user "test" is receiving mail if i send test mail from root user.

# mailx test@abc.com
Subject: test mail
test mail
.
EOT
#

Your valuable advice pls..
Best wishes,

Ganesh.
5 REPLIES 5
Anshumali
Esteemed Contributor

Re: Sendmail need to block incoming mails

Did you try sending a mail from another system?
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Ivan Ferreira
Honored Contributor

Re: Sendmail need to block incoming mails

Check if you have enabled FEATURE(`blacklist_recipients')dnl

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Anshumali
Esteemed Contributor

Re: Sendmail need to block incoming mails

this looks to be a duplicate thread.
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Geert Van Pamel
Regular Advisor

Re: Sendmail need to block incoming mails

The following works for me:

cd /etc/mail

vi access
...
To:refuse@mshome.net REJECT

make

ls -lrt |tail

-rw-r--r-- 1 root root 617 Aug 21 21:05 access
-rw-r----- 1 root root 12288 Aug 21 21:05 access.db

service sendmail restart

tail /var/log/maillog

Aug 21 21:51:50 router sendmail[9867]: l7LJpog9009867: ruleset=check_rcpt, arg1=, relay=pallieter.mshome.net [192.168.30.34], reject=550 5.2.1 ... Mailbox disabled for this recipient

Mayby the following could do the trick? In case the mail domain would not be properly known in DNS?

grep mshome.net /etc/hosts
...
192.168.4.31 mshome.net
Ganesan R
Honored Contributor

Re: Sendmail need to block incoming mails

Sorry friends,

By mistake I have put this thread here instead of in HP-UX.

Anyway thanks for all your responses.
Best wishes,

Ganesh.