Postfix Zarafa DB plugin integration
From Zarafa wiki
m |
(can't get it to work on 6.40.4, perhaps query issue?) |
||
| (4 intermediate revisions not shown) | |||
| Line 2: | Line 2: | ||
Postfix has the possibility to couple also to a MySQL backend for recipient checking and aliases resolving. | Postfix has the possibility to couple also to a MySQL backend for recipient checking and aliases resolving. | ||
Via the following configuration file, you can integrate Postfix with the Zarafa MySQL database. | Via the following configuration file, you can integrate Postfix with the Zarafa MySQL database. | ||
| + | |||
| + | '''UPDATE NOTICE:''' This section is probably out of date and is not guaranteed to work with the latest Zarafa versions. Please proceed with caution. | ||
| + | |||
| + | '''Note:''' When using Red Hat or Centos Postfix doesn't have the mysql module included. You can use the Postfix from the [http://mirror.centos.org/centos/5/centosplus Centos Plus] repository. | ||
| + | |||
| + | '''Note #2:''' For Ubuntu and Debian you might need to install the <tt>postfix-mysql</tt> package. | ||
'''Postfix main.cf''' | '''Postfix main.cf''' | ||
| Line 13: | Line 19: | ||
mynetworks = 127.0.0.0/8 | mynetworks = 127.0.0.0/8 | ||
mailbox_transport = zarafa: | mailbox_transport = zarafa: | ||
| - | + | zarafa_destination_recipient_limit = 1 | |
inet_interfaces = all | inet_interfaces = all | ||
| Line 24: | Line 30: | ||
# For Postfix 2.2 and later The SQL query template. | # For Postfix 2.2 and later The SQL query template. | ||
# See mysql_table(5) for details. | # See mysql_table(5) for details. | ||
| - | query = select value from objectproperty where objectid=(select objectid from objectproperty where value='%s' limit 1) and | + | query = select value from objectproperty where objectid=(select objectid from objectproperty where value='%s' limit 1) and propname='loginname'; |
| - | This configuration only | + | This configuration only resolves the primary mail address of an user. Aliases should be kept in the /etc/aliases file or an extra aliases MySQL table. |
Latest revision as of 15:34, 5 January 2011
The Zarafa DB user plugin will store all user information inside the MySQL database. Postfix has the possibility to couple also to a MySQL backend for recipient checking and aliases resolving. Via the following configuration file, you can integrate Postfix with the Zarafa MySQL database.
UPDATE NOTICE: This section is probably out of date and is not guaranteed to work with the latest Zarafa versions. Please proceed with caution.
Note: When using Red Hat or Centos Postfix doesn't have the mysql module included. You can use the Postfix from the Centos Plus repository.
Note #2: For Ubuntu and Debian you might need to install the postfix-mysql package.
Postfix main.cf
mydomain = demo.zarafa.com myhostname = host alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf myorigin = /etc/mailname mydestination = $myhostname, $myhostname.local, localhost, $mydomain mynetworks = 127.0.0.0/8 mailbox_transport = zarafa: zarafa_destination_recipient_limit = 1 inet_interfaces = all
Postfix mysql-aliases.cf
# The user name and password to log into the mysql server. user = root password = zarafa hosts = 127.0.0.1 dbname = zarafa # For Postfix 2.2 and later The SQL query template. # See mysql_table(5) for details. query = select value from objectproperty where objectid=(select objectid from objectproperty where value='%s' limit 1) and propname='loginname';
This configuration only resolves the primary mail address of an user. Aliases should be kept in the /etc/aliases file or an extra aliases MySQL table.