On Wed, 20 Aug 2003, Kai wrote: >Hi,list. > I am a newbie. > I am using Cyrus-imapd-2.2.0 and postfix 2.0.7. I dont know how to let my >postfix lookups virtual domain in Mysql.And I sent the question to >postfix's maillinglist,but nobody replied me.Would someone give me a sample >of postfix' configuration about virtual domain?
Hi Kai, Here is what I'm using with postfix to enable virtual lookups via mysql; Note that the hosts= line was not working with the .sock option, and 127.0.0.1 fixed many troubles. I included the mysql table schema at the end of the table, but this schema is not the only one that can be used. (in main.cf): virtual_maps = mysql:/etc/postfix/mysql-virtual.cf (in mysql-virtual.cf): # # mysql config file for alias lookups on postfix # comments are ok. # # the user name and password to log into the mysql server hosts = 127.0.0.1 #hosts = /var/lib/mysql/mysql.sock user = mail password = my_password_is_here # the database name on the servers dbname = mail # the table name table = virtual # select_field = rcpt where_field = alias #additional_conditions = and status = '1' (mysql structure) -- -- Table structure for table 'virtual' -- CREATE TABLE virtual ( alias varchar(255) NOT NULL default '', rcpt varchar(255) NOT NULL default '', status int(11) default NULL ) TYPE=MyISAM;