Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Server is running sendmail 8.14

From any machine:

$ telnet mydomain.com 25
HELO mydomain.com
MAIL FROM: <me@mydomain.com>
RCPT TO: <me@mydomain.com>
DATA
this is spam
.

How do I require authentication for any mail that claims to be from a local domain?

This seems like a no-brainer anti-spam feature.

FROM         TO           RESULT
any          non-local    "Relaying denied. Proper authentication required."
non-local    local        success [1]
local        local        success [2]

[1] This is acceptable. Outsiders can send to local users without any kind of authentication. Various DNS checks can be done.

[2] This is the problem. Why should I allow anyone to mail a local user while claiming to be a local user?

share|improve this question
    
Similar question with no solution. –  Marco Jan 29 '13 at 22:29
    
They're not claiming to "be a local user". They're claiming to have mail from a local user. What kind of "authentication" are you thinking of? –  David Schwartz Jan 29 '13 at 23:17
    
When would that not be the same thing? The only place where mail-from-a-local-domain is going to originate is my server (via user's SMTP client). –  Marco Jan 29 '13 at 23:45
    
Okay, so say it originated a local user's SMTP client. Now whatever agent has it is is delivering it to its final destination, your mail server. –  David Schwartz Jan 29 '13 at 23:55
    
Er, what agent? When a user sends mail, there is a direct port-25 TCP connection from their SMTP client to my server. If the destination email address is local (and valid), the mail is moved to the appropriate local inbox. –  Marco Jan 30 '13 at 0:39
show 4 more comments

1 Answer 1

As noted here:

You can require the use of SMTP AUTH for relaying by simply turning off other means of relaying for incoming mail, e.g., the access map or class R. That is, if you have my.domain in /etc/mail/relay-domains or "my.domain RELAY" in the access map, then remove the entry from class R (/etc/mail/relay-domains) and use "To:my.domain RELAY" in the access map.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.