---------- Forwarded message ----------
From: Greg C <agregc@gmail.com>
Date: Nov 17, 2007 3:33 PM
Subject: Re: [Postfixadmin-devel] postfix
To: mattias <mj@mattiasweb.net>

Here are some notes that I made on our internal wiki.  I got my start from one of the example links listed at postfix.org.  I thought I added this to the postfixadmin/DOCUMENTATION directory, but maybe not.


The version of used Postfix MUST support MySQL lookup tables. You can verify that with 'postconf -m'

Its generally recommended to use proxy as well (which should also appear in postconf -m) Three main.cf variables are involved:

virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf

virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf

virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf

Where you chose to store the .cf files doesn't really matter, but they will have database passwords stored in plain text so they should be readable only by user postfix, or in a directory only accessible to user postfix.

This isn't necessarily all you need to do to Postfix to get up and running. Also, additional changes are needed for the vacation autoreply features.

Contents of the files

These files must agree with how PostfixAdmin is using the database. You will need to consider the PostfixAdmin config.inc.php settings for domain_path and domain_in_mailbox. These examples use values of domain_path=YES and domain_in_mailbox=NO.  Tihis also needs to agree with the delivery agent, Dovecot in this case.


user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
#expansion_limit = 100


user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%u'
#query = SELECT domain FROM domain WHERE domain='%s'
#optional query to use when relaying for backup MX
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'
#expansion_limit = 100


user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = '1'
#expansion_limit = 100

On Nov 17, 2007 2:52 PM, mattias <mj@mattiasweb.net> wrote:
How should the postfix main.cf look like?

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
Postfixadmin-devel mailing list