Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable return of NDR messages

David Crowe
Advisor

Disable return of NDR messages

I guess the 1st question is, is it legal to not return messages that could not be delivered into the mail system. 2nd question is, if you don't have to return NDRs, how do you setup Sendmail v8.11 not return messages.
We are receiving a large amount of spam and when it gets rejected it tries to be returned to the sender. In most cases, the sender's address has been spoofed so I would like to just turn off all returns if possible.
4 REPLIES
Todd McDaniel_1
Honored Contributor

Re: Disable return of NDR messages

Sounds like a good example for the use of a filter in /etc/aliases.

userID: /path/to/filter/script

Filter on key words in the emails, might be hard though depending on content.



OR I would try to block the incoming IP with /etc/hosts.allow & deny files.

Unix, the other white meat.
David Crowe
Advisor

Re: Disable return of NDR messages

I want this to be generic and not have to look at indivdual IPs or messages. All I want to do is if someone sends a message to my gateway and it gets reject for whatever reason (such as unknown user), I don't want a message to be returned to the sender. I have been advised by spamcop that I should do this so that my gateway doesn't get blacklisted. As I stated in my first message, I'm not sure if that would be compliant with the RFC.
Todd McDaniel_1
Honored Contributor

Re: Disable return of NDR messages

If you know the range of IPs it belongs to, then deny the range 132.100.x.x thru 132.200.x.x


Or deny the domain in /etc/hosts by listing those you wish to keep...


http://ezine.daemonnews.org/200206/hosts_allow.html



Unix, the other white meat.
Christopher Caldwell
Honored Contributor

Re: Disable return of NDR messages

You have extensive control over rejection behavior using

virtusertable

see

http://www.sendmail.org/virtual-hosting.html

Syntax like

a@a.com a
b@a.com b
@a.com error:nouser No such user here

results in the outright rejection of all e-mail not to a@a.com or b@a.com during the RCPT TO phase.

Look at access_db, mailertable, and virtuser_entire_domain as well.

Details are here:
http://www.sendmail.org/m4/features.html