IntroductionPostfix's default configuration accepts only mails from local users or users within the local network. The problem is that normally the clients which should send emails to this server are not in the same network as the server itself. It is possible to allow all users not within the network to send mails to postfix, but that would be disastrous. After a short time, the server would be a spam sling. The solution is to let postfix only accept mails from authenticated(SMTP-AUTH) users. This can be done using the Simple Authentication and Security Layer (SASL). The good thing is that Postfix can be configured to use Dovecots's SASL implementation instead of using the Cyrus SASL Library.
This article was written for Postfix 2.7, Dovecot 1.2 and Postfix Admin 2.3. Please consult the software documentation for any changes if you are using other versions than these.
In the code blocks I use placeholders, enclosed with square brackets, for values that should be adapted to fit your needs.