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

I want to know that is it possible that using postfix or any other MTA, i can apply a restriction that email sender cannot change/spoof his sender email, and email is only sent from the email ID, through which it was authenticated.

thanks

share|improve this question
    
Why would you want to do such a thing? –  MadHatter Sep 5 '13 at 15:10
    
to stop spam.... –  Farhan Sep 5 '13 at 15:14
    
Spam you receive, spam others receive from you, or spam others receive that claims to be from you but isn't really? –  MadHatter Sep 5 '13 at 15:18
    
i want to apply this restriction for senders i have with me. –  Farhan Sep 5 '13 at 15:32
    
Forcing the email to bear their real address won't stop it being sent. Sure, it'll mean you can track it back to the sender later - but if you have your mail server logs and require SMTP AUTH, you can do that without restricting sender address. I think you should rewrite this question and ask about what you want to do, instead of asking for details of how you think you ought to do it. –  MadHatter Sep 5 '13 at 15:35

2 Answers 2

up vote 2 down vote accepted

I want to know that is it possible that using postfix or any other MTA, i can apply a restriction that email sender cannot change/spoof his sender email, and email is only sent from the email ID, through which it was authenticated.

yes, it possible. You can use smtpd_sender_login_maps with reject_authenticated_sender_login_mismatch

smtpd_sender_restrictions =
 permit_mynetworks,
 reject_authenticated_sender_login_mismatch,
 reject_unknown_sender_domain,
 reject_unlisted_sender,
 reject_unverified_sender

smtpd_sender_login_maps = hash:/etc/postfix/sender_logins_maps

/etc/postfix/sender_logins_maps
user@example.net sasl_login_name1
share|improve this answer

In main.cf you'll want reject_authenticated_sender_login_mismatch as part of your smtpd_sender_restrictions. You'll then need to define smtpd_sender_login_maps. The use case you're describing can be done easily with with either a regex table or prce table.

share|improve this answer

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.