![]() | ![]() |
|
Postfix-Cyrus-Web-cyradm-HOWTOLuc de Louw
This document guides you through the installation of the Postfix mail transportation agent (MTA), the Cyrus IMAP server. The goal is a fully functional high-performance mailsystem with user-administration with Web-cyradm, a webinterface. Data like virtualusers, aliases etc. are stored in a mysql database.
1. IntroductionThe cyrus part is only valid for Cyrus-IMAP 2.1.x and Cyrus-SASL 2.1.x. If you plan to use Cyrus-IMAP 2.0.x then please consult the deprecated version 1.0.x of this HOWTO. I recommend strongly to update to the Cyrus Version 2.1.x. If you do so, you will have chances to get valuable support by the community 1.1. Contributors and ContactsFirst I would thank all those people who send questions and suggestions that made a further development of this document possible. It shows me, sharing knowledge is the right way. I would encourage you to send me more suggestion, just write me an email <luc at delouw.ch> 1.2. Why I wrote this documentThere are different approaches howto set up different mailsystems. Most documents available are related to Sendmail, procmail, WU-IMAPd and friends. These fine-running software is unfortunately very un-flexible concerning user administration. For longer time I was testing alternative MTA's like qmail, postfix and exim, IMAP/POP-servers like Cyrus, vpopmail, Courier IMAP and others. At the end of the day, from my point of view the couple Postfix/Cyrus seems to be the most flexible and performant solution. All these combinations of software had one in common: there was only little documentation available concerning how this software is working together with each other. For installing the software, lot of effort must be spent to get all information needed to get all software running. 1.3. Copyright InformationThis document is copyrighted (c) 2002, 2003 Luc de Louw and is distributed under the terms of the Linux Documentation Project (LDP) license, stated below. Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. If you have any questions, please contact <linux-howto at metalab.unc.edu> 1.4. DisclaimerNo liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. As this is a new edition of this document, there may be errors and inaccuracies, that may of course be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility for that. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements. You are strongly recommended to take a backup of your system before major installation and backups at regular intervals. 1.5. New VersionsNew version of this document are announced on freshmeat The latest version of this document you can get from http://www.delouw.ch/linux
1.6. Credits
1.7. FeedbackFeedback is most certainly welcome for this document. Without your submissions and input, this document wouldn't exist. Please send your additions, comments and criticisms to the following email address : <luc at delouw.ch>. Please understand, that I don't want to add Cyrus-IMAP 2.0.x related stuff in this Document anymore 1.8. TranslationsAt the moment no translations are available. A german translation is planned and would be written by myself as soon as I get the time. Translations to other languages are always welcome. If you translated this document, please translate the SGML source. Please let me know if you begin to translate, so I can set a link here. 2. Technologies2.1. The Postfix MTA
Doesn't it look impressive? - It looks much more complicated as it is. Postfix is indeed nice to configure and handle. Unlike sendmail, postfix is not one monolithic program, it is a compilation of small programs, each of it has a specialized function. At this place I don't what to go into details with program does what. If you are interested how Postfix is working, please see the documentation at http://www.postfix.org/docs.html In this document you will find the information needed to get the system running. 2.2. Cyrus IMAPThe Cyrus IMAP is developed and maintained by Carnegie Mellon University. Unlike the WU-IMAPd Cyrus is using its own method to store the users mail. The data is stored in a own method. Each message is stored in its own file. The benefit of separate file is also the reliability, on filesystem errors, only one message is lost. Metadata like statuts of a message (seen etc) is stored in a database. Additionally the messages are indexed. This makes Cyrus very performant. Especially with lots of users and/or lot of big emails, there is nothing else fast as the Cyrus IMAP-server. Another very important feature is, you don't need a local Un*x user for each account. All users are authenticated by the IMAP-Server. This makes it a great solution for really huge base of users. User administration is done by special IMAP-commands. This allows you to either use the commandline interface, or use one of the available Webinterfaces. This Method is much more secure than a Webinterface to /etc/passwd. Starting from Cyrus 2.1, the SASL-lib version 2 is used for authentication. For the setup described in this HOWTO, there is a tree-layer authentication implemented. Cyrus authenticates with saslauthdaemon which forwards the request to pam_mysql which finally looks up the MySQL-table. Since CMU changed the license policy for Cyrus, this software is going to be used by much more users. 2.3. Cyrus SASLSASL means »Simple Authentication and Security Layer«. It is standardized by the IETF (Internet Engineering Taskforce). SASL is used by network servers (Here for Cyrus-IMAP) to handle authentication requests from clients. Cyrus SASL is a extensive software, and sometimes not easy to understand. Even I just have a minimum knowledge needed to write this HOWTO. 2.4. OpenSSLOpenSSL is a library needed by SASL for encrytion of the data-stream. It is used by by almost all opensource software which needs encryption methods. Most or all distributions comes with a preinstalled OpenSSL. Be sure to install also the appropriate devel-package. If you like, you also can compile OpenSSL by your self. This is especially recommended, if you need to fix a security hole. 2.5. MySQL DatabaseMySQL is a very fast, powerful and very nice to handle Database. Since Cyrus can authenticate its users with pam, you can use pam_mysql as a connector to the userdatebase stored in MySQL. This allows you to create a nice Webinterface for your users for changing passwords, define and delete aliases and more. 2.6. pam_mysqlpam means "Pluggable Authentication module" and was originally proposed by some people at Sun. In meantime a lot of modules have been developed. One of them is an interface to MySQL With pam_mysql you store the users password in a mysql database. Further, Postfix is able to lookup aliases from a MySQL-table. At the end of the day, you have a base for all administrative tasks to be done by the postmaster. You will be able to delegate some tasks to Powerusers, e.g. creating accounts for a particular domain. Changing passwords and creating new aliases can be delegated to the user. At the end of the day you as a Sysadmin have the time to do some more productive tasks, or write a HOWTO for the Linux Documentation Project. 2.7. Web-cyradm Webinterface
Web-cyradm is the webinterface that allows you to perform the administrative tasks to your mailsystem. This screenshot shows the domain administration part of Web-cyradm. Web-cyradm is written in PHP, the most sophisticated html-preprocessor language. If you don't have a webserver with php installed, I would like to refer to my Apache-Compile-HOWTO. This document describes how to set up Apache with PHP and other modules Web-cyradm is under active development from people around the globe. The list of features grows with each release. If you like to contribute to web-cyradm, or you have a nice idea, feel free to contact the mailinglist on http://www.web-cyradm.org Here a choice of features:
Web-cyradm has support for different roles of its users. If you plan to use is as a frontend for your powerusers, please notice, that security may be a problem, the role based stuff needs a security review. 3. Getting and installing the softwareMost of the software is included in your Linux distribution. I. e. SuSE is shipping Cyrus as far as I know since 7.1. Since SuSE 8.1, cyrus-imap 2.1 and sasl2 is included, and works. It is still recommended to compile Cyrus by yourself. SuSE does not ship a MySQL enabled Postifx. Please let me know about other distributions, especially Debian. 3.1. Getting and installing MySQL3.1.1. DownloadOrigin-Site: http://www.mysql.com/downloads/ 3.1.2. Building and installing
For security-improvement add a mysql-user on your system i.e. »mysql«, then
You may wish to start MySQL automatically at boottime, copy /usr/local/mysql/share/mysql/mysql.server to /etc/init.d/ for SuSE, for Redhat it is /etc/rc.d/init.d instead of /etc/init.d/. Further you need to add symbolic links to /etc/init.d/rc3.d for SuSE and /etc/rc.d/rc3.d for Redhat. The following example is for SuSE Linux and should be easily changed for Redhat and other Linux distributions and commercial Unixes.
3.2. Getting and installing Berkeley DBThe Berkeley DB is a requirement for building Cyrus-SASL and Cyrus-IMAP. Some Systems comes with recent versions but without the header files installed. Please see your distributors CD/DVD to check if you can install the header files from a package. Usually this package is called bdb-devel. The version that comes with GNU/Debian Linux is out of Date, you will need to compile most recent version instead. If you already installed Berkely DB on your Debian Box, please fist uninstall the software to prevent conflicts. It is also very important, that Cyrus-SASL and Cyrus-IMAP is compiled with the same version of Berkely DB of else you can run into problems 3.3. Getting and installing OpenSSL3.3.1. Download OpenSSLOrigin-Site http://www.openssl.org 3.3.2. Building and installing
3.4. Getting and installing Cyrus SASL and IMAPBuilding Cyrus SASL and IMAP from source is not a easy task. There are some prerequisites to be fulfilled, and lots of difficult authentication related stuff to be considered. 3.4.1. Download Cyrus SASL and Cyrus IMAPOrigin-Site: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.12.tar.gz Origin-Site: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-2.1.12.tar.gz 3.4.2. Create the cyrus userOn most systems there is no cyrus user and mailgroup per default. Check for a free UID, usually daemons are running with UID less that 100. As example I'm using UID 96 like SuSE has in the default /etc/passwd.
3.4.3. Building and installing Cyrus SASL
The SASL library is installed in /usr/local/lib/sasl2 but some programs are expecting SASL in /usr/lib/sasl2. So it is a good idea to create a symbolic link: ln -s /usr/local/lib/sasl2 /usr/lib/sasl2. 3.4.4. Building Cyrus-IMAP
3.4.5. Automatic startup scriptIf you wish to start the Cyrus IMAP daemon automatically after booting, you need a startupscript. Place the following script in /etc/init.d/ for Redhat it is /etc/rc.d/init.d instead of /etc/init.d/.
If I get the time, I'll provide a more sophisticated script, but this script works Now create the Symlinks in the runlevel directory (SuSE):
For Redhat:
3.5. Getting and installing Postfix3.5.1. DownloadOrigin-Site: http://www.postfix.org/ftp-sites.html 3.5.2. Creating a User-ID (UID) and Group-ID (GID) for postfixBefore you can build and install postfix you have to be sure a »postfix« and a »postdrop« groups and users exists on the system. First check for the groups. You can check this by grep postfix /etc/group and grep maildrop /etc/group If there are no such groups and users, you just create them. Search for a free nummeric UID and GID. In the following example I will use UID and GID 33333 for Postfix and 33335 for the maildrop UID and GID. This ID's are corresponding to other documents.
3.5.3. Building and installingThe following screen shows what you have to do, if you installed MySQL from source as described above. If you installed MySQL from a binary package such as rpm or deb, then you have to change the include and library-flags to -I/usr/include/mysql and -L/usr/lib/mysql.
During make install a few question are asked. Just pressing Enter should match your needs. For Redhat users it could be useful to enter /usr/local/share/man Now you need to create some sybolic links to start Postfix automatically on system startup. The sample is for SuSE Linux, please consult your vendors manual for other distributions.
3.6. Getting and installing PAMPAM is on almost all ditributions installed by default. I'm not descibing here how compile PAM by yourself, because it could break your system. I'll describe instead, how install the RPM. the version could be vary.
Experianced Debian users: Please provide me information how to install pam-devel, thanks 3.7. Getting and installing pam_mysql3.7.1. DownloadOrigin-Site: http://sourceforge.net/projects/pam-mysql/ 3.7.2. Installing
Depending if you compiled mysql by yourself or not, check the Makefile and enter the correct path to your mysql libs and add the compiler flag CFLAGS -I/path/to/mysql/include.
After customizing that file go ahead with compiling pam_mysql
3.8. Getting and installing Web-cyradm3.8.1. DownloadOrigin-Site: http://www.web-cyradm.org 3.8.2. Installing
After unpacking web-cyradm, move it to a place in your webservers DocumentRoot Thats all. Now you need to configure the whole bunch of software. Web-cyradm 0.5.3 is considered stable, and was released on 2003-03-24 Since web-cyradm uses PEAR for its database abstraction layer, you also need a recent copy of PEAR. This is included in recent PHP Versions. I strongly suggest to update PHP to 4.3.1, because a lot of important bugs have been fixed. An often mistake is to forget to touch the logfile and change the owner to the UID that Apache use. This is usually »nobody« or »wwwrun«. 3.8.3. Create the databases and tablesNow we need to create the database and tables for Postfix and Web-cyradm and add a user to the database. Web-cyradm comes with three MySQL scripts: insertuser_mysql.sql and create_mysql.sql. The first inserts the Database user to the database »mysql« and creates the database »mail«. The second creates the needed tables and populates the database with an initial admin-user and the cyrus user. The third script is used for upgrading from Web-cyradm 0.5.2 to 0.5.3. The password for the database user »mail« in this example is »secret«. Please insert whatever user and password you like. The username for the initial superuser is »admin« with the password »test«.
After customizing the username and password, apply the scripts:
3.8.4. Upgrading from 0.5.2 to 0.5.3In version 0.5.3 there us a small Database enhancement done. You can upgrade your Database by issuing the MySQL script that commes with the distribution.
Since Version 0.5.3 web-cyradm does have full support for DES crypted passwords. You can use the php-script migrate.php to convert the users passwords from plain to unix compatible crypt (DES).
4. Configuring MySQL4.1. Securing MySQLBecause you are using MySQL to authenticate users, you need to restrict network access to Port 3306. I suggest to just bind MySQL only to the loopback interface 127.0.0.1. This makes sure nobody can connect to your MySQL Daemon via the network. Edit /etc/init.d/mysql.server and change line 107 as following: Original line:
Changed line:
(Re-)start your MySQL-Daemon by issuing /etc/init.d/mysql.server start To ensure the configuration change was successful issue: netstat -an|grep LISTEN. The Output should be looking similar to this:
4.2. Setting up rinetdThis step is only necessary if you run the mysql sever on another host than the mailserver. It allows you to securely connect from another host by allowing only defined IP adresses. The example used is from the view of the host serving the MySQL database. Lets assume your mailserver has the IP 192.168.0.100 and the MySQL host has 192.168.0.200 Edit /etc/rinetd.conf and add:
This means: The MySQL host is listening on 192.168.0.200 port 3306. If 192.168.0.100 is attempting a connection, it is forwared to 127.0.0.1:3306. All other hosts are rejected. 5. Configuring PAMNow we need to get sure that PAM knows how to authenticate the Cyrus users You have to create the file /etc/pam.d/imap with the following entries:
The lines containing pam_unix_auth.so and pam_unix_acct.so are only needed if you are migrating from WU-IMAP to Cyrus. This allows you to authenticate with its old unix-password AND its new mysql-based password. To use the other services provided by cyrus and smtp-authtication you need to copy the file so that they match the service-ID
6. Configuring PostfixPostfix needs two major config files: main.cf and master.cf. Both needs your attention. 6.1. master.cfYou need to change just one line: old:
new:
What affect that changes? A look to the cyrus man-pages man deliver clears that issue: The Postfix default setup uses a wrong path to cyrus deliver, this is the first change. The parameter »-r« Inserts a proper return path, without that mail rejected/retured by sieve will be sent to the cyrus user at yourdomain. 6.2. main.cfHere you need to change some more things like hostname, relaying, alias-lookups etc. First change hostname:
mydestination Here you have to put all domainnames that are local (corresponding to sendmail's /etc/mail/sendmail.cw). If you have multiple domains separate them with comma.
Relayhost Here you define where to deliver outgoing mails. If you do not provide any host. mails are delivered directly to the destination smtp host. Usually your relayhosts are your providers smtp-server.
Mailtransport Here you define how the mails accepted for local delivery should be handled. In your situation mails should be delivered by the cyrus delivery-program.
At the end of file you need to add:
If you dont want to have a overriding /etc/postfix/virtual, skip the hash entry Outgoing addresses should be rewritten from i.e test0002 at domain to user.name at virtualhost.com. This is important if you like to use a webmail interface.
Now you need to create the file /etc/postfix/mysql-virtual.cf:
The file /etc/postfix/mysql-canonical.cf:
Finally the file /etc/postfix/mysql-mydestination.cf:
SMTP Authentication with SASL and PAM Put the following in your /etc/postfix/main.cf
You also need to create the file /usr/local/lib/sasl2/smtpd.conf with the following content:
The next step is make the saslauthd socket being found by postfix:
7. Configuring Cyrus IMAP7.1. Creating the config filesYou have to create /etc/imapd.conf and /etc/cyrus.conf 7.1.1. /etc/servicesIf you like to use sieve (a mail filtering language), you must change an entry in /etc/services. With SuSE 8.0 take especially care about the port for sieve, they defined the wrong port. Add or change the following lines:
7.1.2. /etc/imapd.conf
Be sure »servername« contains your FQHN (Fully Qualified Hostname) The parameter »unixhierarchysep: yes« is only used if you like to have usernames like »hans.mueller.somedomain.tld« see Section 8 for more info. 7.1.3. Creating the TLS/SSL CertificateIf you want to enable Cyrus' TLS/SSL facilities, you have to create a certificate first. This requires an OpenSSL installation
7.1.4. /etc/cyrus.confThe other file you need to create is /etc/cyrus.conf It is the configuration file for the Cyrus master process. It defines the startup procedures, services and events to be spawned by process »master«.
7.2. Creating the directoriesThere must be created different directories. Additionally you should change some attributes of the filesystem 7.3. Changing the filesystem attributesWhen using the ext2 filesystem, you must set an attribute, that defines, that all changes are immediately committed to the disk. With todays journaling filesystems there is no need. If you are still running ext2 filesystems, I strongly suggest to switch to ext3 filesystems. Ext2 and ext3 are fully compatible to each other. To check what type of filesystem is used for /var issue the command mount or see your /etc/fstab. Please note that the /var could also be a part of the root or other filesystem.
8. Configuring Web-cyradmFirst copy the distributions config file, and create to logfile. The logfile must be owned by user that runns the webserver. This is usually the user »nobody« or »wwwrun«.
8.1. Cyrus setup
This should be self-explanatory. Please note there is no support for SSL connections at the moment, this is especially important for users that what to like to have web-cyradm not on the same server where the cyrus-imapd resides. 8.2. Database setupSince version 0.5.2 web-cyradm uses PEAR as a database abstraction layer. This adds more flexibility. Currently supported databases are MySQL and PostgreSQL. Please note that for PostgreSQL there is a patch needed, because Postfix does not support PostgreSQL natively. I strongly suggest to use MySQL. I know MySQL has some restrictions on transaction and stuff, but it is natively in the Postfix code. The entries should be self explenatory
8.3. Default QuotaThe default quota to be used is set in the variable DEFAULT_QUOTA=20000 and is used when creating a new domain 8.4. Crypted passwordsWeb-cyradm supports the storage of encryted passwords. I strongly suggest, to use encryption. There are two methods supported at the moment: Unix-compatible (crypt) and MySQL. The Unix-compatible encryption allows you to take over encrytped passwords from an existing /etc/shadow. This should be preferred. Unfortunately, MySQL uses a proprietary encryption method which is only available when using MySQL. I'm currently thinking about dropping support for MySQL crypt, because it would only work with MySQL and makes a migration to another database impossible. As soon as there is a method available to re-engineer the MySQL crypt on PHP there will be a solution (Help needed in programming, legal contraints?) Check the variable $CRYPT in the file config.inc.php. Value »plain« means no encryption, »crypt« means Shadow compatible encryption, mysql means MySQL encryption.
8.5. UsernamesThere are two schemas of usernames supported which are defined in the variable »DOMAIN_AS_PREFIX«. The default is to have a defined prefix ($DOMAIN_AS_PREFIX=0), i.e. »test« for the domain »expample.com«. With this scheme, the first user gets the username test0001, the second test0002 and incrementing. The other one is to have usernames like »hans.mueller.example.com«. If that case set $DOMAIN_AS_PREFIX=1 At the moment you can not mix both schemas, evaluate carefully with scheme matches your needs best If you choose to have $DOMAIN_AS_PREFIX=1, be sure you uncomment the option unixhierarchysep: yes like described in Section 7.1.2 9. Testing the setup9.1. (Re-)Starting the daemonsNow all the software has been installed and configured. Lets do some testings now. First you have to (re-)start all the daemons affected
Hopefully all daemons started without any complaints. Note that this is assuming saslauthd is started in the cyrus startup script. Now you can verify if the daemons are running properly by issuing netstat -an|grep LISTEN The output should look similar like that:
The port are assigned like this:
9.2. Testing Web-cyradmNow you should be able to connect to http://localhost/web-cyradm/ Login with the credentials defined before. Define a domainname and some accounts. Be sure the domainname belongs to your server. If not you have to fake it by enter the domain in /etc/hosts. The domain must also be defined as local in /etc/postfix/main.cf (mydestination = domain) Please be sure that you are providing a unique domain prefix when adding a new domain. I.e. test for the domain test.org. If you don't provide such a prefix you will get a error message. 9.3. Testing postfixNow we are going to write a mail:
If you see such a message, then all seems to work fine. Be sure to specify a recipients address you previously defined in the web-cyradm database If you get an error like this:
Then either MySQL is not running, DB permission are not set properly or you missconfigured /etc/postfix/main.cf On any errors, I suggest to examine /var/log/mail. Often you will find some hints whats went wrong. 9.4. Testing the IMAP functionalityA lot of users like to test the cyrus-IMAPd with the Command Line Interface (CLI) »cyradm« and they are failing. To be successful with cyradm, you will need to add the cyrus user to /etc/sasldb2 because »cyradm« always authenticates against SASL AND IMAP. To add the Cyrus user to the sasldb use the command:
To use the »cyradm« CLI please take care that the tool does not recognize standard CLI-options like -u and similar. Please follow the syntax like described in the man page »cyradm 1« like the following example:
With the Cyrus command help you will see all possible commands and its abbreviations. To make that kind of tests. you just need a mailclient like kmail or netscape (Yes of course, M$-Products are working as well) but in this example I'm using kmail. If you enabled TLS/SSL, you may wish to test also the following: If login fails, and you are sure, you typed the right password, take care that MySQL is running. 10. Further InformationHere you will find some other resources available in the internet. 10.1. News groupsSome of the most interesting news groups are:
Maybe you also check out your country newsgroups e.g ch.comp.os.linux Most newsgroups have their own FAQ that are designed to answer most of your questions, as the name Frequently Asked Questions indicate. Fresh versions should be posted regularly to the relevant newsgroups. If you cannot find it in your news spool you could go directly to the FAQ main archive FTP site. The WWW versions can be browsed at the FAQ main archive WWW site. 10.2. Mailing Lists10.2.1. <postfix-users at postfix.org>Send an mail to <majordomo at postfix.org> with the content (not subject):
Before writing to the list, check out the archive: http://www.deja.com/group/mailing.postfix.users 10.2.2. <info-cyrus at lists.andrew.cmu.edu>Send an mail to <majordomo at lists.andrew.cmu.edu> with the content (not subject):
Before writing to the list, check out the archive: http://asg.web.cmu.edu/archive/index.php?mailbox=archive.info-cyrus 10.2.3. <web-cyradm at web-cyradm.org>Subscription can be done trought the webinterface http://www.web-cyradm.org/mailman/listinfo/web-cyradm Before writing to the list, check out the archive for similar incidents: http://www.web-cyradm.org/pipermail/web-cyradm/ 10.3. HOWTOThis are intended as the primary starting points to get the background information as well as show you how to solve a specific problem. Some relevant HOWTOs are Cyrus-IMAP and Apache-Compile-HOWTO. The main site for these is the LDP archive. 10.4. Local ResourcesUsually distributions installs some documentation to your system. As a standard they are located in /usr/share/doc/packages The SuSE rpms of Cyrus contains a lot a such documentation. Postfix has some html-files in the source directory /usr/local/postfix-2.0.3/html PAM comes also with lots of documentation in /usr/share/doc/packages/pam The pam_mysql module has a readme with the incredible size of 1670 bytes. 10.5. Web SitesThere are a huge number of informative web sites available. By their very nature they change quickly so do not be surprised if these links become quickly outdated. A good starting point is of course the Linux Documentation Project home page, an information central for documentation, project pages and much more. To get more deepened information about Postfix, then www.postfix.org would be the starting point. Please let me know if you have any other leads that can be of interest. 11. Questions and AnswersHere I answer the questions which I got from users. If you don't find an answer feel free to contact me
1. FAQ11.1.1. Does web-cyradm only support users like »test0001« ? I'd like to have a more descriptive username web-cyradm does also support usernames like »user.name.example.com« if you configure it. Your need to change config.inc.php and change the value of DOMAIN_AS_PREFIX to 1. then you need to add »unixhierarchysep: yes« to your /etc/imapd.conf 11.1.2. web-cyradm complains about »Fatal error: Call to undefined function: bindtextdomain() in /www/web-cyradm-0.5.3/index.php on line 46«, whats wrong? Web-cyradm needs gettext enabled PHP. Please compile PHP with the configure-option --with-gettext. gettext is needed for NLS (Native Language Support) which means contributors can easily translate web-cyradm to there language. Fill in your Language in the file /usr/local/apache/htdocs/web-cyradm/locale/templates/web-cyradm.pot and send me the file, then your language will be supported in the next CVS snapshot 11.1.3. I got a error from Web-cyradm like this »Fatal error: Call to undefined function: query() in /usr/local/httpd/htdocs/web-cyradm/auth.inc.php on line 17« Web-cyradm depends on PEAR for database abstraction. PEAR is included in recent PHP versions. Often PEAR is a separate package, check out the package base of your distribution. I strongly suggest to update to the most recent version of PHP anyway, because a lot of bugs have been fixed. Another reason could be an authentication error with MySQL. Be sure the user »mail« has enought rights to acccess the database and tables. Good question. LDAP is role-based and it would be indeed a better solution for such applications. Unfortunately LDAP is very hard to set up. You have to make proper schemes etc. MySQL is the way strait ahead, it is very easy to handle and versatile. There is a PAM module available for LDAP, feel free to use it. Lots of people like to see such a setup with Qmail. The reason why is, Mysql-support is a hack and not in the included in the main source-tree. This could end up in a bad situation. Think if a security-hole is found in qmail and the patch does not work with the corrected version. Postfix is supporting MySQL natively. Another (personal) reason is that I find Postfix more sympatic (I don't know why) Postfix cannot look up the alias table. Must common failure is that MySQL is not running, or there is a authentication Error. Check /var/log/mail and /usr/local/mysql/var/<hostname>.err to track the error. Unsure. I personally compiled MySQL and Apache on AIX 4.3 and 5.1L (php does not run properly on AIX), Solaris 6/7/8 and HP-UX. Cyrus, pam_mysql and cyrus I never tried. On Solaris there is maybe a chance to get pam_mysql running. On AIX there is no PAM, but a similar mechanism. In short: Try it, and let me know if were successful |