I have almost default configuration of Postfix
How can I configure Postfix to ask for username/password before relaying mail from other than "mynetworks" IP's?
Thank You very much
So SASL on postfix is a pain to configure.
The magic lines are:
You need TLS to ensure data security, the files are a standard SSL key pair:
You'll also want to listen on the SMTP submission port, that needs something like:
Actually configuring the SASL backend is highly dependent on what your authentication source is, so I'd need for info to suggest on that.
What you are looking for is Postfix with SASL Authentication. You will need the Cyrus SASL library to authenticate your users but it's also possible to use dovecot for that.
Dovecot is my favorite, most likely you need an POP3/IMAP (and LDA) service anyway. With dovecot it's very easy to authenticate your users against the same database as your POP3/IMAP users. Postfix.org has a guide on how to setup Postfix / SASL with Dovecot / Cyrus: http://www.postfix.org/SASL_README.html.