problem - configuring MySQL for postfix/courier catch-all
My main.cf reads …
smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
biff = no
appenddotmydomain = no
readme_directory = no
smtpdsaslauth_enable = yes
brokensaslauth_clients = yes
smtpdsaslauthenticated_header = yes
smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectunauth_destination
smtpdusetls = yes
smtpdtlscert_file = /etc/ssl/certs/mailcert.pem
smtpdtlskeyfile = $smtpdtlscertfile
myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =
relayhost =
mynetworks = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailboxsizelimit = 0
recipient_delimiter = +
inet_interfaces = all
virtualaliasdomains =
virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf
virtualmailboxdomains = proxy:mysql:/etc/postfix/mysql-domains.cf
virtualmailboxmaps = proxy:mysql:/etc/postfix/mysql-mailboxes.cf
virtualmailboxbase = /home/vmail
virtualuidmaps = static:5000
virtualgidmaps = static:5000
…
Would I be right in thinking I need to change the above to:
myhostname = localhost
virtualaliasdomains = mydomain.com mydomain2.com another.tld
And .. well, here's where I am most confused what to do…
virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf # What do I do here??
…
Were I not using MySQL, I guess I would set up /etc/postfix/virtual map file and add something like:
@mydomain.com
@another.tld
… but as I have created mySQL tables for domains, users, email and forward, I am guessing I need to do something different,
…and thought I would ask before messing everything up.
Any pointers greatly appreciated.
3 Replies
user1@domain.com domain.com/user1/.maildir/
@domain.com domain.com/user1/.maildir/
I've never used mysql though, so not sure if it will work for you.