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.

I just installed mutt and postfix on my server and I've been playing around with it. Now, however, I want to make sure that no one can remotely send mail with my server as a SMTP relay.

I don't know that much about Mail servers, so for the sake of being overly clear, I want to be able to receive messages to local user accounts, send messages from local accounts to outside addresses, but not remotely send messages through the server.

Currently it receives and send's messages just how I want it, but I haven't been able to find a clear way of only disabling remote relaying.

Does anyone have any suggestions? It's a default installation of mutt and postfix, I can post any details you request. Thank you, all!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Postfix is secured that way by default. You have to explicitly misconfigure it to be an so called open relay.

For different requirements there is a documentation about several common scenarios: http://www.postfix.org/STANDARD_CONFIGURATION_README.html

share|improve this answer
add comment

Check the parameter relay_domains in postfix.

In addition to the mynetworks, postfix by default accepts mail that Postfix is final destination for:

  • destinations that match $inet_interfaces or $proxy_interfaces,
  • destinations that match $mydestination
  • destinations that match $virtual_alias_domains,
  • destinations that match $virtual_mailbox_domains.

These destinations do not need to be listed in $relay_domains so make sure to change them appropriately.

So as a hint make sure that mynetworks = 127.0.0.1. In that way no one, except for the local users will be able to use your smtp as a relay.

share|improve this answer
    
is relay_domains in main.cf? Where are all of those variables set? It looks like exactly what I need, but I can't test it until I get home. –  Logan Aug 6 '12 at 13:36
    
yeah everything is in the main.cf. To check all the config parameters just run postconf –  golja Aug 8 '12 at 1:30
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.