Richard
Get the latest source code from postfix.org, check the blog for the latest checked version we used. I’m compiling Postfix with several options to help me achieve the flexibility and the security needed. We require the MySQL support for mail box maintenance, SASL for authentication and the SSL options to enable TLS support. Recently I found that PCRE support is also required if you want to use the complex filtering options in Postfix.
First you need to install the PCRE library (Perl Compatible Regular Expressions), to enable fancy filtering in Postfix. Download the source code from the site. You can compile and install it by running the following commands:
make
sudo make install
Unpack the Postfix source into a directory, use the Terminal and ‘cd’ into the directory where you unpacked it. Issue the following commands as a normal user:
CCARGS=’-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
-I/usr/include/sasl -DHAS_PCRE -I/usr/local/include \
-DHAS_SSL -I/usr/include/openssl \
-DHAS_MYSQL -I/usr/local/mysql/include/mysql’ \
AUXLIBS=’-L/usr/lib -lldap -lsasl2 -L/usr/lib -llber -L/usr/local/lib \
-L/usr/local/lib -lpcre -lssl -L/usr/local/mysql/lib/mysql \
-lmysqlclient -lz -lm’
To compile and install Postfix run:
For the questions that are asked at the end of the compilation accept the default values.
Please note that for the dependencies on directories I’m assuming you’ve got MySQL installed from my previous instructions. If not please check the location of the MySQL files mentioned in the configuration. You can find out which configuration on your system is active by running the command ‘mysql_config’.
Next step: Building the Courier Auth library in 32 bits on Leopard



Comments
12:59 am
Hi,
It looks like authmysql is not working. I have checked just about everything I can think of but its a no go. Ideas are welcome.
Dec 8 17:08:34 macmini imapd[94]: Connection, ip=[::ffff:192.168.1.20]
Dec 8 17:08:34 macmini authdaemond[81]: received auth request, service=imap, authtype=login
Dec 8 17:08:34 macmini authdaemond[81]: authuserdb: trying this module
Dec 8 17:08:34 macmini authdaemond[81]: userdb: unable to stat /usr/local/etc/authlib/userdb.dat: No such file or directory
Dec 8 17:08:34 macmini authdaemond[81]: userdb: looking up ‘user’
Dec 8 17:08:34 macmini authdaemond[81]: authuserdb: REJECT – try next module
Dec 8 17:08:34 macmini authdaemond[81]: authldap: trying this module
Dec 8 17:08:34 macmini authdaemond[81]: selected ldap protocol version 3
Dec 8 17:08:34 macmini authdaemond[81]: binding to LDAP server as DN ‘cn=administrator, o=example, c=com’, password ‘toto’
Dec 8 17:08:34 macmini authdaemond[81]: ldap_simple_bind_s failed: Can’t contact LDAP server
Dec 8 17:08:34 macmini authdaemond[81]: selected ldap protocol version 3
Dec 8 17:08:34 macmini imapd[94]: LOGIN FAILED, user=user, ip=[::ffff:192.168.1.20]
Dec 8 17:08:34 macmini imapd[94]: authentication error: Input/output error
Dec 8 17:08:34 macmini authdaemond[81]: binding to LDAP server as DN ‘cn=administrator, o=example, c=com’, password ‘toto’
Dec 8 17:08:34 macmini authdaemond[81]: ldap_simple_bind_s failed: Can’t contact LDAP server
Dec 8 17:08:34 macmini authdaemond[81]: authldap: TEMPFAIL – no more modules will be tried
8:42 am
@Hector, please check your ‘authdaemonrc‘ file in the directory ‘/usr/local/etc/authlib‘. From the log you pasted it shows that the mysql module is not loaded and the ldap and userdb are which should not happen. Use the information here for more help: http://diymacserver.com/installing-the-mailserver/the-basic-mailserver/configuring-courier-auth-to-use-mysql/