Next Previous Contents

5.1 MySql optimizer

In order to make use of the mysql optimizer, just configure postfix to use mysql. Then, you just have to pass the name of the database (as used with postfix) to courier-authpostfix as outlined above (editing the configuration files of pop3d and imapd and modifying the cron job).

The MySql optimizer maintains support for multiple MySql servers in case one dies. However, keep in mind that courier-authpostfix will not take care of maintaining all the databases in sync, and some other method should be used (like binary logging).

Keep also in mind that little if no test have been made to verify reliability of this module (for short, it may not work if the main database dies).

If you are wondering why to use a distributed database such as MySql for pop-before-smtp, think to an environment where you have a cluster of more than one SMTP server and you distribute users using something like perdition with courier-imap or pop3.

Table format

Ok, a 2 fields table with a char(12) for the ip address and a varchar(20) for the logintime should be enough. In postfix, select field should be set to logintime while the where field should be set to the ip address.


Next Previous Contents