LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   upgrade imap-2001a on redhat9 (https://www.linuxquestions.org/questions/linux-server-73/upgrade-imap-2001a-on-redhat9-511304/)

zhanghanxi 12-17-2006 06:17 AM

upgrade imap-2001a on redhat9
 
environment:
1. mail server
2. redhat 9 (2.4.20-8smp) - changed a lot.
3. sendmail-8.13.6
4. cyrus-sasl-2.1.21. (saslauthd and pam authorization)
5. BerkeleyDB-4.5
6. gcc-4.1.0 20050309(experimental)

I tried 2 ways

1. cyrus-imap-2.2.12.
after installed, it seems ok as long as I recreate mailbox for each user.

The problem is how can i migrate all old mailboxes(/var/spool/mail/* and /home/users/*) into the new imap system?

2. imap-2006d.
can't work. will get stuck in authentication.
according to its document, i'd tried to rebuild it in 3 ways.
make lrh PASSWORDTYPE=pam
make lrh
make lnp

the problem is how can i get it work on RH9?

Thanks a lot.

unSpawn 12-18-2006 06:38 AM

Welcome to LQ. Hope you like it here.

the problem is how can i get it work on RH9?
You shouldn't invest time in that:

Probably not what you want to hear but since running GNU/Linux is all about performance, protecting assets and providing services in a continuous, stable and secure way you must know Red Hat Linux maintenance and errata support ended on April 30 of 2004 for all YES ALL Red Hat Linux releases (not RHEL) so update using Fedora Legacy while you plan your migration and make it soon. If you like what RHEL provides but don't want to pay for it you could run CentOS. If you like what RHL provided then you could run Fedora Core. Else check out the many "choose a distro" threads here.

That said you may find an RPM in Fedora Legacy repo so you don't have to build it. Alternatively search the CentOS or DAG repo's for imap-2002d-12.i386.rpm and see if that works (dependency-wise).


The problem is how can i migrate all old mailboxes(/var/spool/mail/* and /home/users/*) into the new imap system?
Make sure all /var/spool/mail/* and /home/users/* UID's match.
Check if the service is accessable from (X)inetd (/etc/xinet.d/imap and /etc/xinet.d/imaps).
( Check if PAM auth necessary for IMAP. If needed make a file with IMAP login usernames and IMAP login passwords on separate lines:
Code:

imap_username
imap_password
imap_username
imap_password

Compile with:
Code:

db_load -T -t hash -f imap.logins /etc/pam.d/imap.logins.db
and make the PAM stack:
Code:

#%PAM-1.0
auth required /lib/security/pam_userdb.so db=/etc/pam.d/imap.logins
account required /lib/security/pam_userdb.so db=/etc/pam.d/imap.logins

)
Now set up a ~/.mailboxlist for each account:
Code:

find /home/users -type d -maxdepth 1 | while read dir; do
getent passwd "${dir//*\//}" 2>&1>/dev/null && { cd "${dir}" && umask 0027 \
&& t="${dir}/.mailboxlist" && echo "${dir}/mbox" > "${t}" && find "${dir}/mail" \
-type f 2>/dev/null >> "${t}"; chown ${dir//*\//}.${dir//*\//} "${t}"; }; done

Should work now but YMMV(VM) as usual.


All times are GMT -5. The time now is 08:54 PM.