Hi, having a lot of trouble with getting Postfix, MySQL and DBMail running I had a little chit-chat with Brian Evans and Wietse Venema on the Postfix-ML.
"mailbox_transport" and "local_recipient_maps" belong to the local domain class which is only for delivering to local UNIX accounts! Using them for external MDAs can have unpredictable side-effects! Instead, use the virtual mailbox domain class! example: ## Virtual mailbox domain class: DBmail MDA virtual_transport = dbmail-lmtp:<hostname/ip>:<port> virtual_mailbox_domains = mysql:/etc/postfix/sql-virtual_mailbox_domains.cf virtual_mailbox_maps = mysql:/etc/postfix/sql-virtual_mailbox_maps.cf Additionally, the SQL-queries MUST NOT return any value from the database. When "mysql:/etc/postfix/sql-virtual_mailbox_domains.cf" returns one domain or the list of domains, Postfix cannot relay mail to the internet anymore! Instead return "1" if a value exists in the database or a empty set if it doesn't exists! examples: /etc/postfix/sql-virtual_mailbox_maps.cf: user = <MySQL-username> password = <MySQL-password> hosts = <MySQL-host> dbname = <MySQL-database> query = SELECT 1 FROM dbmail_aliases WHERE alias='%s'; sql-virtual_mailbox_domains.cf: user = <MySQL-username> password = <MySQL-password> hosts = <MySQL-host> dbname = <MySQL-database> query = SELECT DISTINCT 1 FROM dbmail_aliases WHERE SUBSTRING_INDEX(alias, '@', -1) = '%s'; (If you use aliases for the email-addresses and simple usernames you do not need to query dbmail_users. In case you use email-addresses as usernames you need to add dbmail_users to the query.) Best regards, Renne _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
