Postfix Cyrus Web cyradm HOWTO
To ensure the configuration change was successful,
netstat  an|grep LISTEN
. The
Output should be looking similar to this:
bond:~ # netstat  an|grep LISTEN
tcp
0
0 127.0.0.1:3306
0.0.0.0:*
LISTEN
4.2. Setting up rinetd
This step is only necessary if you run the MySQL sever on host other than the mail
server. This allows you to securely connect from another host since access is
allowed only from pre defined IP addresses.
The example used is from the view of the host serving the MySQL database. Lets
assume your mail server has the IP 192.168.0.100 and the MySQL host has
192.168.0.200
Edit
/etc/rinetd.conf
and add:
192.168.0.200 3306 127.0.0.1 3306
allow 192.168.0.100
This means: The MySQL host is listening on 192.168.0.200 port 3306. If
192.168.0.100 attempts a connection, it is forwarded to 127.0.0.1:3306. All other
hosts are rejected.
5. Configuring PAM
Now 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:
auth sufficient pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
auth sufficient pam_unix_auth.so
account required pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
account
sufficient
pam_unix_acct.so
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.
22




MySQL Web Hosting Postfix-Cyrus-Web-cyradm MySQL Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.