"What it does" This is an XMail "script" to pass mail messages to UW-IMAP server. The problem in linking this two servers is that UW-IMAP can not pick-up messages in XMail spool and in it's spool format. So I use standart procmail package to pass messages. It can the same time sort it and process (as it's name stands for, - "PROC[essing ]MAIL". "How to install" Let's asume user testuser with e-mail address testuser@xmailserver.somewhere.net wants convert his account from POP3 XMail to IMAP-4 UW-IMAP. So, he should make in his HOME directory ~/.procmail, and store there the file rc.mail containing his mail rules. See http://ww.uwasa.fi/~ts/info/proctips.html for a lot of examples, tips and tricks, or examples section of procmailex manpage. First you should install procmail (http://www.procmail.org) and uw-imap (http://www.washington.edu/imap/) packages. Let /etc/procmailrc be like this: $cat /etc/procmailrc VERBOSE=off PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin MAILDIR=$HOME/Mail #make sure it exists! PMDIR=$home/.procmail LOGFILE=$PMDIR/log LOCKFILE=$HOME/.lockmail INCLUDERC=$PMDIR/rc.mail We need a simple program to chop first 5 lines from stdin and copy all bytes from the begining of 6-th line to the end of file to stdout. I wrote it in C: $cat chop5.c #include int main() { char c = getc(stdin); int nl = 0; for(;;){ if(c == EOF) break; if(nl > 4) putc(c,stdout); if(c == '\n') ++nl; c = getc(stdin); } return 0; } I run 'gcc chop5' and copy a.out to some place in the procmailrc PATH (/usr/local/bin or if for the single user may be to his $HOME/bin): $gcc chop5.c $cp a.out /usr/local/bin/chop5 Also you need install script xmail2procmail, may be in the same place: $cat /usr/local/bin/xmail2procmail #!/bin/sh /usr/local/bin/chop5 < $1 | /usr/bin/procmail -d testuser \ > /dev/null exit 97 And the last thing - XMail filter to call this xmail2procmail on messages to testuser: $cat /var/MailRoot/filters/testuser\@xmailserver.somewhere.net /usr/local/bin/xmail2procmail @@FILE "How to use". Install all this, then create in your mail client new IMap account and that's it. WBR, Sergey Ivanov