Configuring Postfix means editing files, I’ll only note the settings that differ from the default settings. We will start by editing the ‘‘ configuration file located in the directory ‘/etc/postfix/‘ (before you start changing make a copy of the original file for safe keeping, which you should do always). Please note that only the difference from the default settings is documented:

# The hostname is the hostname you get from your ISP.
# Don’t take one from your virtual domains
myhostname = server.isp-domain.tld
# you can reduce to level 0 when every is working.
debug_peer_level = 2
# my additions for the virtual domain administration
# to use the MySQL database.
virtual_alias_maps = mysql:/etc/postfix/
virtual_gid_maps = static:102
virtual_mailbox_base = /usr/local/virtual/
virtual_mailbox_domains = mysql:/etc/postfix/
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_minimum_uid = 102
virtual_transport = virtual
virtual_uid_maps = static:102
# The settings for the SASL authentication using the autdaemon.
smtpd_recipient_restrictions =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_pw_server_security_options = noanonymous
smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject

As a last step there are the new files that are to be created to accommodate the MySQL access for the user administration. The are to be created in the directory ‘/etc/postfix‘.
user = postfix
password = postfixpassword
hosts =
dbname = postfix
query = SELECT goto FROM alias WHERE address=’%s’ AND active = 1
user = postfix
password = postfixpassword
hosts =
dbname = postfix
query = SELECT domain FROM domain WHERE domain=’%s’
user = postfix
password = postfixpassword
hosts =
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username=’%s’ AND active = 1

Next step: Configuring Courier-auth to use MySQL