Operating System - HP-UX
1834914 Members
2567 Online
110071 Solutions
New Discussion

How to reject mails from unknown users?

 
SOLVED
Go to solution
Thomas Schler_1
Trusted Contributor

How to reject mails from unknown users?

Hi,

I'm running sendmail 8.9.3.1 on HP-UX 10.20.

I want to get rid of all the spam mails. Normally, reply addresses of spam mails are not valid as error messages like the following indicate:

----- Transcript of session follows -----
... while talking to mx02.hotmail.com.:
>>> RCPT To:
<<< 550 Requested action not taken: mailbox unavailable
550 ... User unknown

So, in this case, if mailbox is unavailable and user unknown on hotmail.com, I do not want to accept any mail from this user on this host.

How do I configure sendmail to accept mails only if the sender's email address is valid, i.e. the sender must be a valid user on the sending host/domain?
no users -- no problems
2 REPLIES 2
Sanjay_6
Honored Contributor

Re: How to reject mails from unknown users?

Hi thomas,

Try these antispamming controls,

http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000054954278

Hope this helps.

Regds
Christopher Caldwell
Honored Contributor
Solution

Re: How to reject mails from unknown users?

>How do I configure sendmail to accept mails >only if the sender's email address is valid, >i.e. the sender must be a valid user on the >sending host/domain?

AFAIK, you can't to what you're trying to do (there'd be many happy folks if you could).

Here's why

sendmail can use the vrfy command to "verify that it will accept an address for delivery", however sendmail isn't required to honor vrfy; in fact, good security practice would have you turn off vrfy altogether.

rcpt will tell you if a host will recieve mail for a given recipient, but
-since hosts aren't guaranteed to be available all of the time
-since sending hosts and receiving hosts aren't usually the same in large mail systems
using rcpt as a delivery criteria would be difficult and filled with unanticipated side-effects.

Here's what you can do:

make sure you are only willing to accept mail from domains that resolve in DNS (this is one of the default anti-spam rulesets).

consider hooking sendmail to something like RBL from mail-abuse.org. RBL keeps [DNS|BGP] rules that hook into sendmail to tell sendmail not to receive mail from known spammers. RBL is probably your best bet to fight spam.